// from: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#setting-environment-variables pipeline { agent any environment { CC = 'clang' } stages { stage('Example') { environment { DEBUG_FLAGS = '-g' } steps { sh 'printenv' } } } }