I'm tasked to write Jenkinsfiles for a Jenkins cluster that I do not manage.
I'm facing an issue where some of my jobs are hanging with the message "xxxx is reserved for jobs with matching label expression"
only when using declarative pipeline.
However that does not occurs with scripted pipelines.
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
disableConcurrentBuilds()
}
stages {
stage("Hello") {
steps {
sh 'echo hello'
}
}
}
}
I saw this post but the vague solution (lack of example) didn't help.