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

Loading Declarative Pipeline from file if statements work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • Jenkins 2.60.3
      pipeline declarative 1.1.6

      I'm loading a declarative pipeline from a file, I substitute variables in it from a Jenkinsfile and then run the declarative pipeline. 

      When I do this, I'm able to put if statements around stages and within stages without having to use the script block. I'm able to hide stages too with this method if I wrap the stage in an if-block. This all seems to work well but I'm concerned this isn't appropriate bsaed on what I've read. 

      Any idea why this works ?

      I've attached an example file that I load and run. 

       

            abayer Andrew Bayer
            jon_vecchio Jon Vecchio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: