Jenkins – Checking if a string value is set to a parameter

  Check if the value of the variable “GIT_COMMIT_ID” is set, if so, then do a checkout by the hash of the commit, if not, then do a checkout by the name of the branch. The variable “GIT_BRANCH_NAME” is taken from the Active Choice parameter. Jenkinsfile: