mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-07 08:02:09 +01:00
fix deployment of helm chart into wrong repository
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
31
scm-packaging/helm/src/main/build/repository.groovy
Normal file
31
scm-packaging/helm/src/main/build/repository.groovy
Normal 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)
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user