Declarative syntax: ${env.WORKSPACE} not set in environment block

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Pipeline - December

      I got the following in my jenkins file:

      pipeline {
      agent any

      environment {
      SOURCE = "${env.WORKSPACE}
      mydirectory"
      // The above is not working? WORKSPACE is null as you can see later.
      HTDOCS = "C:\\Apache24\\htdocs
      "
      }

      stages {
      stage('Prepare') {
      steps {
      echo "WORKSPACE ${env.WORKSPACE}" // correct
      echo "SOURCE ${env.SOURCE}" // wrong, is set to null\myDirectoy
      echo "INEW_HTDOCS ${env.INEW_HTDOCS}" // correct
      }
      }

      ....

            Assignee:
            Andrew Bayer
            Reporter:
            Paul Garstenauer
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: