New answers tagged

0

Working off of the existing answers and the Jenkins example documentation I came up with the following nested parallel solution. The Stage View (2.19) plugin and Blue Ocean (1.24.5) do not display them as you would hope, so I used the Groovy Postbuild (2.5) plugin (whitelisted) to show a result summary on the build page of the Classic View (the Badge plugin ...


0

withCredentials publish environment variables, and in sh to access the environment variables, you have to do it like this: "${env.JOB_BASE_NAME}". Try this: withCredentials([usernamePassword(credentialsId: params.git_credential, passwordVariable: 'DOCKER_PASSWORD', usernameVariable: 'DOCKER_USERNAME')]) { sh 'git reset --hard; git clone https://$...


1

It sounds like you want a when statement. As I understand it, you want to execute stage B when you are on branch update/jenkinsfile. In order to do this, you need to add a condition to stage B: pipeline { agent any stages { stage('A') { steps { sh 'echo "Step A"' } } stage('B') ...


Top 50 recent answers are included