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

When conditions based on changelog

    XMLWordPrintable

    Details

    • Sprint:
      Declarative - 1.2
    • Similar Issues:

      Description

      Would be good to be able to run stages based on what is stated in the changelog.

      For example only run the UI testing stage if the change affects a .js or .html file

      Or if some statement is in the commit comment.

        Attachments

          Issue Links

            Activity

            rsandell rsandell created issue -
            rsandell rsandell made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            rsandell rsandell made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            rsandell rsandell made changes -
            Remote Link This issue links to "PR 178 (Web Link)" [ 17428 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditionalScript.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/abdcb3287077398f9b91538fb46d3c9a1d301736
            Log:
            JENKINS-46064 Remove debug prints and fix a test

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditionalScript.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/abdcb3287077398f9b91538fb46d3c9a1d301736 Log: JENKINS-46064 Remove debug prints and fix a test
            rsandell rsandell made changes -
            Link This issue is related to JENKINS-46086 [ JENKINS-46086 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditional.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditionalScript.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
            pipeline-model-definition/src/test/resources/when/changelog/changelog.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/bd9bf70abfd9c27044945893fe363decfe73e543
            Log:
            JENKINS-46064 Noting future TODOs and some build logging

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditional.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditionalScript.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java pipeline-model-definition/src/test/resources/when/changelog/changelog.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/bd9bf70abfd9c27044945893fe363decfe73e543 Log: JENKINS-46064 Noting future TODOs and some build logging
            abayer Andrew Bayer made changes -
            Sprint Declarative - 1.2 [ 366 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/pom.xml
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/DefaultChangeLogStrategy.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditionalScript.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
            pipeline-model-extensions/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/ChangeLogStrategy.java
            pom.xml
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c8e55bbdc7d80494c6f79eca8c647b61198291f4
            Log:
            JENKINS-46064 ChangeLogStrategy extension and improve testing

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/pom.xml pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/DefaultChangeLogStrategy.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditionalScript.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java pipeline-model-extensions/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/ChangeLogStrategy.java pom.xml http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c8e55bbdc7d80494c6f79eca8c647b61198291f4 Log: JENKINS-46064 ChangeLogStrategy extension and improve testing
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ExecuteConvertedTest.java
            pipeline-model-definition/src/test/resources/json/when/changelog/changelog.json
            pipeline-model-definition/src/test/resources/json/when/changelog/changeset.json
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/f1614bcaff62634c4544031881b1c473ba5c0f38
            Log:
            JENKINS-46064 Add json roundtrip tests for the new when conditions

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ExecuteConvertedTest.java pipeline-model-definition/src/test/resources/json/when/changelog/changelog.json pipeline-model-definition/src/test/resources/json/when/changelog/changeset.json http://jenkins-ci.org/commit/pipeline-model-definition-plugin/f1614bcaff62634c4544031881b1c473ba5c0f38 Log: JENKINS-46064 Add json roundtrip tests for the new when conditions
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeSetConditional.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditional.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditional.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditionalScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeSetConditionalScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditionalScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditionalScript.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/2b14f519c268464c0cc6d5bfd579a4c966f5141b
            Log:
            JENKINS-46064 CamelCase as requested

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeSetConditional.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditional.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditional.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeSetConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditionalScript.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/2b14f519c268464c0cc6d5bfd579a4c966f5141b Log: JENKINS-46064 CamelCase as requested
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeSetConditionalScript.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ebc4787807c272f4c87f9cb0a2d72ba541088c7e
            Log:
            JENKINS-46064 Groovy is groovy again

            Use collection.any instead of boring traditional iterations

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeSetConditionalScript.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ebc4787807c272f4c87f9cb0a2d72ba541088c7e Log: JENKINS-46064 Groovy is groovy again Use collection.any instead of boring traditional iterations
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/WhenConditionalValidator.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
            pipeline-model-definition/src/test/resources/when/changelog/badRegularExpression.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c21c3d6a9c86bfd5f3075b38d88cb2d2c25d3c96
            Log:
            JENKINS-46064 Validator for changelog regular expression

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/WhenConditionalValidator.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/Messages.properties pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java pipeline-model-definition/src/test/resources/when/changelog/badRegularExpression.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c21c3d6a9c86bfd5f3075b38d88cb2d2c25d3c96 Log: JENKINS-46064 Validator for changelog regular expression
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/e6bdb1fe3cbeae3b96eef5850017497e8c4b4446
            Log:
            JENKINS-46064 removed unused import

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/e6bdb1fe3cbeae3b96eef5850017497e8c4b4446 Log: JENKINS-46064 removed unused import
            abayer Andrew Bayer made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/pom.xml
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/465eea3f1e98bb859c58f8ed946e80941fdd517b
            Log:
            JENKINS-46064 Check the changelog of all builds when it is a PR

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/pom.xml pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/AbstractChangelogConditionalScript.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/465eea3f1e98bb859c58f8ed946e80941fdd517b Log: JENKINS-46064 Check the changelog of all builds when it is a PR
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditional.java
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditional.java
            pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditionalScript.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/e2d67cc959f7161698dcf90f4eb6dd101a2557fa
            Log:
            JENKINS-46064 Adapt to the new parser engine

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangelogConditional.java pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditional.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangesetConditionalScript.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/e2d67cc959f7161698dcf90f4eb6dd101a2557fa Log: JENKINS-46064 Adapt to the new parser engine
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: rsandell
            Path:
            pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/6d88745e175bee51bce3f7dbdf292acbedc6d89c
            Log:
            JENKINS-46064 removed a todo that is done

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: rsandell Path: pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/ChangeLogConditional.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/6d88745e175bee51bce3f7dbdf292acbedc6d89c Log: JENKINS-46064 removed a todo that is done
            Hide
            bitwiseman Liam Newman added a comment -

            rsandell We need documentation updates for this as well.
            I know it's a pain, but since there is no single program manager responsible for organizing Pipeline features, it becomes everyone's responsibility.
            Please make sure there is JIRA for this and preferably put creating at least the first draft of those changes on your plate.

            Thanks!

            Show
            bitwiseman Liam Newman added a comment - rsandell We need documentation updates for this as well. I know it's a pain, but since there is no single program manager responsible for organizing Pipeline features, it becomes everyone's responsibility. Please make sure there is JIRA for this and preferably put creating at least the first draft of those changes on your plate. Thanks!

              People

              • Assignee:
                rsandell rsandell
                Reporter:
                rsandell rsandell
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: