Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42753

Generate runtime model directly from AST model

    XMLWordPrintable

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      Declarative - 1.2

      Description

      My apologies if this isn't a bug, but I've searched high and low and tried a number of things, but I can't seem to find the syntax ex. to solve what's broken.  After upgrading pipeline plugins to the latest releases (as of today), my declarative pipelines broke because it seems there might no longer be ability to use a property in the agent label.  This was working:

      pipeline{
      
          parameters {
              choice(choices: 'server-cd\server-demo', description: DeployEnvironmentHelp, name: 'Environment')
          } 
      
          environment {
              DEPLOYENVIRONMENT = "${params.Environment}"
          }
      
          agent none
      
          stages {
              stage ("Stage 1") {
                  agent {label DEPLOYENVIRONMENT}
                  echo 'Get Deployment Helper Files from SCM repo(s)...'
              }
          } 
      }

      But the pipeline fails saying that the DEPLOYENVIRONMENT is not a proper value (I no longer have the exact message )  

      As of model def. 1.1.1, is it no longer possible to use an environment variable or property in the agent label?   btw - I'm setting DEPLOYENVIRONMENT so I can do other tests and not have to keep using params.Environment, but in other pipelines I set properties so that I can define which agent based on properties that change in the pipeline.

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              abayer Andrew Bayer
              Reporter:
              jedavis Jason Davis
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: