pipeline { agent { label 'jjb' } options { timestamps() ansiColor('xterm') } stages { stage('Validate Input') { steps { sh ''' set -eux test -d "${JJB_PATH}" test -f "${JJB_PATH}/global.yaml" ''' } } stage('Deploy Jobs') { steps { withCredentials([usernamePassword( credentialsId: 'jenkins-admin-userpass', usernameVariable: 'J_USER', passwordVariable: 'J_PASS' )]) { sh ''' set -eux cat > /tmp/jenkins-job-builder.ini <