What are the common built-in environment variables in a pipeline?
BeginnerConceptDeclarative pipeline syntax
Answer
BUILD_NUMBER, BUILD_ID, BUILD_URL, JOB_NAME, JOB_BASE_NAME, WORKSPACE, NODE_NAME, EXECUTOR_NUMBER, JENKINS_URL. In multibranch: BRANCH_NAME, CHANGE_ID, CHANGE_TARGET, CHANGE_BRANCH, CHANGE_AUTHOR, TAG_NAME. From the Git plugin after checkout: GIT_COMMIT, GIT_BRANCH, GIT_URL, GIT_PREVIOUS_SUCCESSFUL_COMMIT. The full list is at ${JENKINS_URL}pipeline-syntax/globals.
More on Declarative pipeline syntax
What is the minimum valid declarative pipeline?BeginnerWhat agent types exist in declarative pipelines?IntermediateWhen do you use `agent none` at the top level?IntermediateHow do nested sequential stages work and why are they useful?IntermediateList the `post` conditions and when each fires.IntermediateWhat are the most useful `when` conditions?Intermediate