diff --git a/scm-packaging/docker/pom.xml b/scm-packaging/docker/pom.xml index ea30dd2695..9d745dbacf 100644 --- a/scm-packaging/docker/pom.xml +++ b/scm-packaging/docker/pom.xml @@ -52,6 +52,28 @@ + + pl.project13.maven + git-commit-id-plugin + 4.0.0 + + + get-git-commit-id + + revision + + initialize + + + + false + + ^git.commit.id.abbrev$ + + + + + org.apache.maven.plugins maven-resources-plugin diff --git a/scm-packaging/helm/pom.xml b/scm-packaging/helm/pom.xml index dd4ff35ab9..e06a0e7e0d 100644 --- a/scm-packaging/helm/pom.xml +++ b/scm-packaging/helm/pom.xml @@ -46,6 +46,26 @@ + + pl.project13.maven + git-commit-id-plugin + 4.0.0 + + + get-git-commit-id + + revision + + validate + + + + + ^git.commit.id.abbrev$ + + + + org.codehaus.gmavenplus gmavenplus-plugin @@ -69,6 +89,7 @@ + @@ -118,17 +139,17 @@ ${project.basedir}/target/chart ${docker.tag} - $${docker.tag} + ${docker.tag} false https://get.helm.sh/helm-v${helm.version}-${helm.os}-${helm.arch}.${helm.ext} ${deployment.serverId} - ${deployment.target}/repository/helm-v2-releases/ + ${helm.repository} ARTIFACTORY ${deployment.serverId} - ${deployment.target}/repository/helm-v2-snapshots/ + ${helm.repository} ARTIFACTORY diff --git a/scm-packaging/helm/src/main/build/repository.groovy b/scm-packaging/helm/src/main/build/repository.groovy new file mode 100644 index 0000000000..33021393f8 --- /dev/null +++ b/scm-packaging/helm/src/main/build/repository.groovy @@ -0,0 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2020-present Cloudogu GmbH and Contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +def repository = "https://packages.scm-manager.org/repository/helm-v2-releases/" +def version = project.version +if (version.contains("SNAPSHOT")) { + repository = "https://packages.scm-manager.org/repository/helm-v2-snapshots/" +} + +project.properties.setProperty("helm.repository", repository) diff --git a/scm-packaging/pom.xml b/scm-packaging/pom.xml index 1a8ec5e9c5..148815da97 100644 --- a/scm-packaging/pom.xml +++ b/scm-packaging/pom.xml @@ -57,35 +57,6 @@ helm - - - - - pl.project13.maven - git-commit-id-plugin - 4.0.0 - - - get-git-commit-id - - revision - - validate - - - - false - ${project.basedir}/../.git - - ^git.commit.id.abbrev$ - - true - - - - - -