I've been forced to change a jenkins server from one server to another twice. The first time, I moved it from an Ubuntu 20.04 server to an Ubuntu 21 without problems; the build (multibranch pipeline) worked fine.
But now I've been forced to change the jenkins again to another server that runs Debian 10 and now the pipeline skips all steps except checkout and post (sending an email).
This is the Jenkinsfile:
pipeline {
agent any
environment {
GIT_BRANCH = "origin/${BRANCH_NAME}"
BRANCH_NAME = "${BRANCH_NAME}"
REGISTRY_CREDENTIALS = credentials('REDACTED')
REGISTRY= "my.remote.regsitry"
}
stages {
stage ('Checkout') {
steps {
checkout scm
}
}
stage ('Build') {
steps {
sh '''#!/bin/bash
cd ci
echo "BRANCH_NAME=$BRANCH_NAME"
echo "GIT_BRANCH=$GIT_BRANCH"
./build.sh my.remote.registry
'''
}
}
stage ('Push') {
steps {
sh '''#!/bin/bash
cd ci
echo "Logging in the $REGISTRY registry as $REGISTRY_CREDENTIALS_USR ..."
if ( ! docker login -p "$REGISTRY_CREDENTIALS_PSW" -u "$REGISTRY_CREDENTIALS_USR" "$REGISTRY" ) ; then
echo "Could not login to ${REGISTRY}. Aborting..."
return 1;
fi
./push.sh dockdev.epiclabs.io
if [ -e alias.sh ] ; then
. ./gitinfo.sh
./alias.sh "$TAG" "$BRANCH" my.remote.registry
./push.sh --tag "$BRANCH" my.remote.registry
fi
'''
}
}
stage ('Deploy') {
steps {
sh '''#!/bin/bash
cd ci
./deploy.sh "192.168.10.254/cid" my.remote.registry
'''
}
}
}
post {
always {
emailext attachLog: true,
body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n",
subject: "CID Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}",
to: 'REDACTED'
}
}
}
The pipeline behaves well in the first two servers (deploy it's supposed to fail, that is not the issue I'm talking about :) ):
But now it's skipping steps:
There are no logs that reflect any errors. I don't know where else to look.