fix deployment of helm chart into wrong repository

This commit is contained in:
Sebastian Sdorra
2020-05-26 16:45:00 +02:00
parent 1766f2f679
commit 8a0505f4dd
4 changed files with 77 additions and 32 deletions

View File

@@ -52,6 +52,28 @@
<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.0.0</version>
<executions>
<execution>
<id>get-git-commit-id</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
<configuration>
<skipPoms>false</skipPoms>
<includeOnlyProperties>
<includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
</includeOnlyProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>

View File

@@ -46,6 +46,26 @@
<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.0.0</version>
<executions>
<execution>
<id>get-git-commit-id</id>
<goals>
<goal>revision</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<includeOnlyProperties>
<includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
</includeOnlyProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
@@ -69,6 +89,7 @@
<configuration>
<scripts>
<script>${project.basedir}/src/main/build/download.groovy</script>
<script>${project.basedir}/src/main/build/repository.groovy</script>
<script>${project.basedir}/../docker/src/main/build/name.groovy</script>
</scripts>
</configuration>
@@ -118,17 +139,17 @@
<configuration>
<chartDirectory>${project.basedir}/target/chart</chartDirectory>
<chartVersion>${docker.tag}</chartVersion>
<appVersion>$${docker.tag}</appVersion>
<appVersion>${docker.tag}</appVersion>
<autoDetectLocalHelmBinary>false</autoDetectLocalHelmBinary>
<helmDownloadUrl>https://get.helm.sh/helm-v${helm.version}-${helm.os}-${helm.arch}.${helm.ext}</helmDownloadUrl>
<uploadRepoStable>
<name>${deployment.serverId}</name>
<url>${deployment.target}/repository/helm-v2-releases/</url>
<url>${helm.repository}</url>
<type>ARTIFACTORY</type>
</uploadRepoStable>
<uploadRepoSnapshot>
<name>${deployment.serverId}</name>
<url>${deployment.target}/repository/helm-v2-snapshots/</url>
<url>${helm.repository}</url>
<type>ARTIFACTORY</type>
</uploadRepoSnapshot>
</configuration>

View File

@@ -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)

View File

@@ -57,35 +57,6 @@
<module>helm</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.0.0</version>
<executions>
<execution>
<id>get-git-commit-id</id>
<goals>
<goal>revision</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<skipPoms>false</skipPoms>
<dotGitDirectory>${project.basedir}/../.git</dotGitDirectory>
<includeOnlyProperties>
<includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
</includeOnlyProperties>
<injectAllReactorProjects>true</injectAllReactorProjects>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>