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

Allow plugins to contribute to Pipeline global library

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'd like to be able to write a plugin that provides an opinionated DSL for Pipeline, behaving like it had been added to the global library, i.e., something like https://github.com/jenkinsci/workflow-examples/tree/master/global-library-examples/global-function but more so. I like the idea of delivering it via a plugin so that it can be tested, versioned, released, etc like any other plugin, but I don't see any way to do this currently. I'd imagine the logical way to do this would be to add the capacity to do this to Pipeline proper, but I could be wrong.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment - - edited

            Also need to allow the library code to be loaded in trusted mode, which the GlobalVariable API does not currently make straightforward. That would simplify some things; for example DockerDSL.MiscWhitelist could be deleted, and @Whitelisted removed from ImageNameTokens.

            Show
            jglick Jesse Glick added a comment - - edited Also need to allow the library code to be loaded in trusted mode, which the GlobalVariable API does not currently make straightforward. That would simplify some things; for example DockerDSL.MiscWhitelist could be deleted, and @Whitelisted removed from ImageNameTokens .
            Hide
            jglick Jesse Glick added a comment -

            allow the library code to be loaded in trusted mode

            Turns out this already works, as of JENKINS-34650.

            Show
            jglick Jesse Glick added a comment - allow the library code to be loaded in trusted mode Turns out this already works, as of JENKINS-34650 .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/docker/workflow/DockerDSL.java
            src/main/java/org/jenkinsci/plugins/docker/workflow/ImageNameTokens.java
            http://jenkins-ci.org/commit/docker-workflow-plugin/abe4066b6b4eb1af3e922897add192df4e0294ef
            Log:
            JENKINS-32731 JENKINS-34650 Docker.groovy is already trusted.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/docker/workflow/DockerDSL.java src/main/java/org/jenkinsci/plugins/docker/workflow/ImageNameTokens.java http://jenkins-ci.org/commit/docker-workflow-plugin/abe4066b6b4eb1af3e922897add192df4e0294ef Log: JENKINS-32731 JENKINS-34650 Docker.groovy is already trusted.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/docker/workflow/DockerDSL.java
            src/main/java/org/jenkinsci/plugins/docker/workflow/ImageNameTokens.java
            src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy
            http://jenkins-ci.org/commit/docker-workflow-plugin/223612bc8378cc3e02cc6fecee1416c5bd533af9
            Log:
            Merge pull request #75 from jglick/GlobalVariable-JENKINS-32731

            JENKINS-32731 JENKINS-34650 Docker.groovy is already trusted

            Compare: https://github.com/jenkinsci/docker-workflow-plugin/compare/1f5f9d0147c4...223612bc8378

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/docker/workflow/DockerDSL.java src/main/java/org/jenkinsci/plugins/docker/workflow/ImageNameTokens.java src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy http://jenkins-ci.org/commit/docker-workflow-plugin/223612bc8378cc3e02cc6fecee1416c5bd533af9 Log: Merge pull request #75 from jglick/GlobalVariable- JENKINS-32731 JENKINS-32731 JENKINS-34650 Docker.groovy is already trusted Compare: https://github.com/jenkinsci/docker-workflow-plugin/compare/1f5f9d0147c4...223612bc8378
            Hide
            abayer Andrew Bayer added a comment -

            The current situation is sufficient, so I'm closing this.

            Show
            abayer Andrew Bayer added a comment - The current situation is sufficient, so I'm closing this.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                abayer Andrew Bayer
              • Votes:
                3 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: