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

OZG-3140 run on new jenkins

parent 8b934d58
No related branches found
No related tags found
No related merge requests found
pipeline { pipeline {
agent { agent {
node { node {
label 'jenkins-worker' label 'jenkins-build-agent'
} }
} }
...@@ -60,7 +60,6 @@ pipeline { ...@@ -60,7 +60,6 @@ pipeline {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
} }
container("maven-17"){
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn --version' sh 'mvn --version'
sh 'mvn -s $MAVEN_SETTINGS clean install spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3' sh 'mvn -s $MAVEN_SETTINGS clean install spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3'
...@@ -78,7 +77,6 @@ pipeline { ...@@ -78,7 +77,6 @@ pipeline {
} }
} }
} }
}
post { post {
always{ always{
junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true junit testResults: '**/target/surefire-reports/*.xml', skipPublishingChecks: true
...@@ -97,13 +95,11 @@ pipeline { ...@@ -97,13 +95,11 @@ pipeline {
script { script {
FAILED_STAGE = env.STAGE_NAME FAILED_STAGE = env.STAGE_NAME
} }
container('maven-17') {
configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) {
sh 'mvn -s $MAVEN_SETTINGS -DskipTests deploy' sh 'mvn -s $MAVEN_SETTINGS -DskipTests deploy'
} }
} }
} }
}
stage('Tag and Push Docker image') { stage('Tag and Push Docker image') {
steps { steps {
...@@ -128,7 +124,6 @@ pipeline { ...@@ -128,7 +124,6 @@ pipeline {
stage('Test, build and deploy Helm Chart') { stage('Test, build and deploy Helm Chart') {
steps { steps {
container('k8s') {
script { script {
FAILED_STAGE=env.STAGE_NAME FAILED_STAGE=env.STAGE_NAME
HELM_CHART_VERSION = generateHelmChartVersion() HELM_CHART_VERSION = generateHelmChartVersion()
...@@ -145,7 +140,6 @@ pipeline { ...@@ -145,7 +140,6 @@ pipeline {
} }
} }
} }
}
stage('Trigger Dev rollout') { stage('Trigger Dev rollout') {
when { when {
...@@ -293,7 +287,6 @@ Void checkoutProvisioningRepo() { ...@@ -293,7 +287,6 @@ Void checkoutProvisioningRepo() {
} }
Void tagAndPushDockerImage(String imageName, String newTag){ Void tagAndPushDockerImage(String imageName, String newTag){
container("docker") {
withCredentials([usernamePassword(credentialsId: 'jenkins-docker-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-docker-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}' sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}'
...@@ -301,7 +294,6 @@ Void tagAndPushDockerImage(String imageName, String newTag){ ...@@ -301,7 +294,6 @@ Void tagAndPushDockerImage(String imageName, String newTag){
sh "docker push docker.ozg-sh.de/${imageName}:${newTag}" sh "docker push docker.ozg-sh.de/${imageName}:${newTag}"
} }
} }
}
String getPomVersion(String pomFile){ String getPomVersion(String pomFile){
def pom = readMavenPom file: pomFile def pom = readMavenPom file: pomFile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment