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

Globals not accessible in Declarative Pipeline outside script directive

    XMLWordPrintable

Details

    Description

      See https://github.com/jenkins-infra/jenkins.io/pull/611

      Basically, it was a design decision to not allow any form of thing.method() in Declarative. This was needed to support validation.

      It is possible to circumvent this in several ways and there are bugs that might address this, but it is a hard problem.

      Attachments

        Issue Links

          Activity

            bitwiseman Liam Newman created issue -
            bitwiseman Liam Newman made changes -
            Field Original Value New Value
            Summary Globals not accessible in Declarative Pipeline. Globals not accessible in Declarative Pipeline outside script directive
            bitwiseman Liam Newman made changes -
            Description See https://github.com/jenkins-infra/jenkins.io/pull/611

            I need go back over this to see what the actually behavior is.
            bitwiseman Liam Newman made changes -
            Remote Link This issue links to "PR 611 (Web Link)" [ 15497 ]
            bitwiseman Liam Newman made changes -
            Link This issue relates to WEBSITE-321 [ WEBSITE-321 ]
            bitwiseman Liam Newman made changes -
            Description See https://github.com/jenkins-infra/jenkins.io/pull/611

            I need go back over this to see what the actually behavior is.
            See https://github.com/jenkins-infra/jenkins.io/pull/611

            I need go back over this to see what the actually behavior is. Steps from shared libraries work, but Globals (defined using class) are not. Not sure about what happens without a class.


            bitwiseman Liam Newman made changes -
            Link This issue relates to JENKINS-37011 [ JENKINS-37011 ]
            bitwiseman Liam Newman made changes -
            Description See https://github.com/jenkins-infra/jenkins.io/pull/611

            I need go back over this to see what the actually behavior is. Steps from shared libraries work, but Globals (defined using class) are not. Not sure about what happens without a class.


            See https://github.com/jenkins-infra/jenkins.io/pull/611

            Basically, it was a design decision to not allow any form of {{thing.method()}} in Declarative. It is possible to circumvent this in several ways, and there are bugs that might address this.
            bitwiseman Liam Newman made changes -
            Description See https://github.com/jenkins-infra/jenkins.io/pull/611

            Basically, it was a design decision to not allow any form of {{thing.method()}} in Declarative. It is possible to circumvent this in several ways, and there are bugs that might address this.
            See https://github.com/jenkins-infra/jenkins.io/pull/611

            Basically, it was a design decision to not allow any form of {{thing.method()}} in Declarative. This was needed to support validation.

            It is possible to circumvent this in several ways and there are bugs that might address this, but it is a hard problem.
            bitwiseman Liam Newman made changes -
            Link This issue relates to JENKINS-41335 [ JENKINS-41335 ]
            abayer Andrew Bayer made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            abayer Andrew Bayer made changes -
            Remote Link This issue links to "PR #127 (better error reporting) (Web Link)" [ 15498 ]
            abayer Andrew Bayer made changes -
            Resolution Won't Fix [ 2 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            bitwiseman Liam Newman made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              abayer Andrew Bayer
              bitwiseman Liam Newman
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: