diff --git a/Jenkinsfile b/Jenkinsfile index c41673024fd93d06e48aa01802f233ba851da45f..37feec55d72466e7ad17ffcb7f2304d5b7501a19 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -151,7 +151,7 @@ pipeline { dir('aggregation-manager-job/src/main/helm') { sh "helm package --version=${HELM_CHART_VERSION} ." - deployHelmChart(HELM_CHART_VERSION) + deployHelmChart('aggregation-manager-job', HELM_CHART_VERSION) } } } @@ -282,13 +282,13 @@ String getElementAccessToken() { } } -Void deployHelmChart(String helmChartVersion) { +Void deployHelmChart(String helmChartName, String helmChartVersion) { withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]){ if (env.BRANCH_NAME == 'release') { - result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps -F file=@aggregation-manager-'''+helmChartVersion+'''.tgz''', returnStdout: true + result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps -F file=@-'''+helmChartName+'''-'''+helmChartVersion+'''.tgz''', returnStdout: true } else { - result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@aggregation-manager-'''+helmChartVersion+'''.tgz''', returnStdout: true + result = sh script: '''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@'''+helmChartName+'''-'''+helmChartVersion+'''.tgz''', returnStdout: true } if (result != '') {