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

PipelineTriggersJobProperty / pipelineTriggers() - snippet generator and syntax doc fail

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I was looking to use the new ability to trigger builds from a multi-branch project on a schedule.

      To try to use it, I went to look for the docs for how to use it, but both the snippet generator and the doc failed.

      For example, when you go to try to generate the trigger with a schedule of "H/15 * * * *", it generated the following:

      properties [pipelineTriggers([]), [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project']]

      So I then went to look at the pipeline syntax - but on that page, I then found the following:
      {{$class: 'PipelineTriggersJobProperty'
      triggers
      Array/List:
      java.lang.UnsupportedOperationException: do not know how to categorize attributes of type hudson.triggers.Trigger<?>
      }}

      I am also attaching a screenshot

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/15aa0ae9be1867b7bc0911a2785000952df4d8ea
            Log:
            JENKINS-37477 - Demonstrate snippets not generating right for triggers

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/15aa0ae9be1867b7bc0911a2785000952df4d8ea Log: JENKINS-37477 - Demonstrate snippets not generating right for triggers
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStep.java
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/378631399ffb542c005723033f42b0af8b2e5e08
            Log:
            JENKINS-37477 Updating for SNAPSHOT of workflow-job.

            Which fixes doc generation, but not snippet generator.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStep.java src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/378631399ffb542c005723033f42b0af8b2e5e08 Log: JENKINS-37477 Updating for SNAPSHOT of workflow-job. Which fixes doc generation, but not snippet generator.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/debde517af80c551a86e17c14f7a6f2eb1ccab83
            Log:
            JENKINS-37477 Working test for snippet generator for triggers.

            Can't do round tripping due to JENKINS-29711, and StepConfigTester
            doesn't work due to this being a Pipeline-specific JobProperty, but
            the snippet generator test does what's expected.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/debde517af80c551a86e17c14f7a6f2eb1ccab83 Log: JENKINS-37477 Working test for snippet generator for triggers. Can't do round tripping due to JENKINS-29711 , and StepConfigTester doesn't work due to this being a Pipeline-specific JobProperty, but the snippet generator test does what's expected.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/c8494c01368a9641b0f768a37ccc8d57da1e7d6c
            Log:
            JENKINS-37477 Add a test for lack of failures in doc generation.

            Ignoring errors in re: lack of @DataBoundConstructor for now. That may
            change, but those are generally symptomatic of something so deep in
            the core that they're not worth worrying about at the moment.

            The guts of the test should probably move to workflow-cps for common
            usage, a la SnippetizerTester.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/c8494c01368a9641b0f768a37ccc8d57da1e7d6c Log: JENKINS-37477 Add a test for lack of failures in doc generation. Ignoring errors in re: lack of @DataBoundConstructor for now. That may change, but those are generally symptomatic of something so deep in the core that they're not worth worrying about at the moment. The guts of the test should probably move to workflow-cps for common usage, a la SnippetizerTester.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStep.java
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/42c3b10d3e49fb1b41d3a2663610b2256bbdf055
            Log:
            Merge pull request #28 from abayer/jenkins-37477

            Test for JENKINS-37477

            Compare: https://github.com/jenkinsci/workflow-multibranch-plugin/compare/80120a5bbfb7...42c3b10d3e49

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStep.java src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/42c3b10d3e49fb1b41d3a2663610b2256bbdf055 Log: Merge pull request #28 from abayer/jenkins-37477 Test for JENKINS-37477 Compare: https://github.com/jenkinsci/workflow-multibranch-plugin/compare/80120a5bbfb7...42c3b10d3e49

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                gregcovertsmith Greg Smith
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: