Skip to content
Snippets Groups Projects
Commit b76f4ed8 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6177 adjust helm repository on release branch

parent d7448e5b
No related branches found
No related tags found
No related merge requests found
...@@ -205,7 +205,7 @@ pipeline { ...@@ -205,7 +205,7 @@ pipeline {
Void deployHelmChart(String helmChartVersion) { Void deployHelmChart(String helmChartVersion) {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]){ withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]){
result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@ozgcloud-elster-transfer-operator-'''+helmChartVersion+'''.tgz''', returnStdout: true result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=''' + getHelmRepository() +''' -F file=@ozgcloud-elster-transfer-operator-'''+helmChartVersion+'''.tgz''', returnStdout: true
if (result != '') { if (result != '') {
error(result) error(result)
...@@ -213,11 +213,11 @@ Void deployHelmChart(String helmChartVersion) { ...@@ -213,11 +213,11 @@ Void deployHelmChart(String helmChartVersion) {
} }
} }
String getHelmRepoUrl(){ String getHelmRepository(){
if (isReleaseBranch()) { if (isReleaseBranch()) {
return "https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps" return 'ozg-base-apps'
} }
return "https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot" return 'ozg-base-apps-snapshot'
} }
String validateBranchName(branchName) { String validateBranchName(branchName) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment