Hi All,
I have the following pipeline. I don't expect the steps in the when condition to run, but they are. Can anyone tell me what i'm doing wrong? (I know using an expression instead of a simple equals is overkill, but this is a simplified example to show my issue)
-Michael
pipeline {
// Discarded: Promote Builds When...
agent any
environment {
Development = true
}
stages {
stage('test') {
when {
not {
expression {
Development == ~/(?i)(1|Y|YES|T|TRUE|ON|RUN)/
}
}
}
steps {
echo 'Development is false'
}
}
}
}