Question : jenkins pipeline global variables define and usage
Answered by : xiaomian
pipeline { agent { label '!windows' } environment { DISABLE_AUTH = 'true' DB_ENGINE = 'sqlite' } stages { stage('Build') { steps { echo "Database engine is ${DB_ENGINE}" echo "DISABLE_AUTH is ${DISABLE_AUTH}" sh 'printenv' } } }
}
Source : https://www.jenkins.io/doc/pipeline/tour/environment/ | Last Update : Wed, 27 Apr 22