mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-07 06:26:23 +02:00
fix deployment of helm chart into wrong repository
This commit is contained in:
@@ -52,6 +52,28 @@
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<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>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
|||||||
@@ -46,6 +46,26 @@
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<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>
|
<plugin>
|
||||||
<groupId>org.codehaus.gmavenplus</groupId>
|
<groupId>org.codehaus.gmavenplus</groupId>
|
||||||
<artifactId>gmavenplus-plugin</artifactId>
|
<artifactId>gmavenplus-plugin</artifactId>
|
||||||
@@ -69,6 +89,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<scripts>
|
<scripts>
|
||||||
<script>${project.basedir}/src/main/build/download.groovy</script>
|
<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>
|
<script>${project.basedir}/../docker/src/main/build/name.groovy</script>
|
||||||
</scripts>
|
</scripts>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -118,17 +139,17 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<chartDirectory>${project.basedir}/target/chart</chartDirectory>
|
<chartDirectory>${project.basedir}/target/chart</chartDirectory>
|
||||||
<chartVersion>${docker.tag}</chartVersion>
|
<chartVersion>${docker.tag}</chartVersion>
|
||||||
<appVersion>$${docker.tag}</appVersion>
|
<appVersion>${docker.tag}</appVersion>
|
||||||
<autoDetectLocalHelmBinary>false</autoDetectLocalHelmBinary>
|
<autoDetectLocalHelmBinary>false</autoDetectLocalHelmBinary>
|
||||||
<helmDownloadUrl>https://get.helm.sh/helm-v${helm.version}-${helm.os}-${helm.arch}.${helm.ext}</helmDownloadUrl>
|
<helmDownloadUrl>https://get.helm.sh/helm-v${helm.version}-${helm.os}-${helm.arch}.${helm.ext}</helmDownloadUrl>
|
||||||
<uploadRepoStable>
|
<uploadRepoStable>
|
||||||
<name>${deployment.serverId}</name>
|
<name>${deployment.serverId}</name>
|
||||||
<url>${deployment.target}/repository/helm-v2-releases/</url>
|
<url>${helm.repository}</url>
|
||||||
<type>ARTIFACTORY</type>
|
<type>ARTIFACTORY</type>
|
||||||
</uploadRepoStable>
|
</uploadRepoStable>
|
||||||
<uploadRepoSnapshot>
|
<uploadRepoSnapshot>
|
||||||
<name>${deployment.serverId}</name>
|
<name>${deployment.serverId}</name>
|
||||||
<url>${deployment.target}/repository/helm-v2-snapshots/</url>
|
<url>${helm.repository}</url>
|
||||||
<type>ARTIFACTORY</type>
|
<type>ARTIFACTORY</type>
|
||||||
</uploadRepoSnapshot>
|
</uploadRepoSnapshot>
|
||||||
</configuration>
|
</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>
|
<module>helm</module>
|
||||||
</modules>
|
</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>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user