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

OZG-3140 jenkinsfile new jenkins

parent a91f78ec
Branches
Tags
No related merge requests found
......@@ -6,7 +6,7 @@ pipeline {
}
environment {
BLUE_OCEAN_URL = "https://jenkins.ozg-sh.de/blue/organizations/jenkins/intelliform-adapter/detail/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/pipeline"
BLUE_OCEAN_URL = "https://jenkins.ozg-sh.de/job/intelliform-adapter/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
RELEASE_REGEX = /\d+.\d+.\d+/
SNAPSHOT_REGEX = /\d+.\d+.\d+-SNAPSHOT/
FAILED_STAGE = ""
......@@ -190,10 +190,10 @@ pipeline {
Void deployHelmChart(String helmChartVersion) {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]){
if (env.BRANCH_NAME == 'release') {
result = sh script: '''curl -u $USERNAME:$PASSWORD http://nexus.dev-tools:8081/service/rest/v1/components?repository=ozg-base-apps -F file=@Intelliform-Adapter-'''+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=@Intelliform-Adapter-'''+helmChartVersion+'''.tgz''', returnStdout: true
}
else {
result = sh script: '''curl -u $USERNAME:$PASSWORD http://nexus.dev-tools:8081/service/rest/v1/components?repository=ozg-base-apps-snapshot -F file=@Intelliform-Adapter-'''+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=@Intelliform-Adapter-'''+helmChartVersion+'''.tgz''', returnStdout: true
}
if (result != '') {
......@@ -287,7 +287,7 @@ Void checkoutProvisioningRepo() {
}
Void tagAndPushDockerImage(String imageName, String newTag){
withCredentials([usernamePassword(credentialsId: 'jenkins-docker-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
withCredentials([usernamePassword(credentialsId: 'jenkins-nexus-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}'
sh "docker tag docker.ozg-sh.de/${imageName}:build-latest docker.ozg-sh.de/${imageName}:${newTag}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment