I'm trying to use an env var in Jenkins' pipeline options {}
block, but it seems they aren't extrapolated at that stage. Am I missing something or is it intentional and there's no way to make it work?
Example:
pipeline {
agent {
docker {
image '...'
label 'docker'
}
}
environment {
MAGIC_APP_NAME = "xxx"
MAGIG_APP_ID = "yyy"
}
options {
connection: gitLabConnection("GitLab-${env.MAGIC_APP_ID}")
}
}