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

Need to be able to use Flexible Publish in matrix job post-build actions

    XMLWordPrintable

Details

    Description

      I would love to be able to use this (and, by extension, Conditional Build Steps), in matrix job post-build actions. Please please!!

      Attachments

        Issue Links

          Activity

            celltestr celltestr added a comment -

            We are also having a problem with the Flexible publish plugin on matrix jobs. The checkbox does not exist in the "Post-build Actions"

            I tried copying the xml code from a regular job and update the config.xml of the matrix job and it worked. The problem is that every time someone is configuring the matrix job and hit save it removes the Flexible publish section since it does not exist in the UI.

            Fix will be really appreciated.

            celltestr celltestr added a comment - We are also having a problem with the Flexible publish plugin on matrix jobs. The checkbox does not exist in the "Post-build Actions" I tried copying the xml code from a regular job and update the config.xml of the matrix job and it worked. The problem is that every time someone is configuring the matrix job and hit save it removes the Flexible publish section since it does not exist in the UI. Fix will be really appreciated.
            cjw296 Chris Withers added a comment -

            Yes please...

            cjw296 Chris Withers added a comment - Yes please...
            ikedam ikedam added a comment -

            Flexible Publish for multiconfiguration projects are disabled with code:

                    public boolean isApplicable(final Class<? extends AbstractProject> aClass) {
                        //@TODO enable for matrix builds - requires aggregation
            //            return FreeStyleProject.class.equals(aClass);
                        return !MatrixProject.class.equals(aClass) && !PROMOTION_JOB_TYPE.equals(aClass.getCanonicalName());
                    }
            

            @bap
            Let me know the case using Flexible Publish in a multiconfiguration project causes a problem. That is the case that requires an aggregation. I'll consider a way to resolve.

            ikedam ikedam added a comment - Flexible Publish for multiconfiguration projects are disabled with code: public boolean isApplicable( final Class <? extends AbstractProject> aClass) { //@TODO enable for matrix builds - requires aggregation // return FreeStyleProject. class. equals(aClass); return !MatrixProject. class. equals(aClass) && !PROMOTION_JOB_TYPE.equals(aClass.getCanonicalName()); } @bap Let me know the case using Flexible Publish in a multiconfiguration project causes a problem. That is the case that requires an aggregation. I'll consider a way to resolve.
            ikedam ikedam added a comment -

            Flexible Publish must support MatrixAggregatable for work with multiconfiguration projects.
            This allows publishers work both for each axe combination builds and the parent build.

            ikedam ikedam added a comment - Flexible Publish must support MatrixAggregatable for work with multiconfiguration projects. This allows publishers work both for each axe combination builds and the parent build.
            ikedam ikedam added a comment - Sent a pull request. https://github.com/jenkinsci/flexible-publish-plugin/pull/2

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalMatrixAggregator.java
            src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java
            src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexibleMatrixAggregator.java
            src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexiblePublisher.java
            src/main/java/org/jenkins_ci/plugins/flexible_publish/MarkPerformedBuilder.java
            src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/config.jelly
            src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/config.properties
            src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/help-configuredAggregation.html
            http://jenkins-ci.org/commit/flexible-publish-plugin/3fbb375fed52cc506e7493a6542d967bcf846af3
            Log:
            JENKINS-14494 Supports MatrixAggregator.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalMatrixAggregator.java src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexibleMatrixAggregator.java src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexiblePublisher.java src/main/java/org/jenkins_ci/plugins/flexible_publish/MarkPerformedBuilder.java src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/config.jelly src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/config.properties src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/help-configuredAggregation.html http://jenkins-ci.org/commit/flexible-publish-plugin/3fbb375fed52cc506e7493a6542d967bcf846af3 Log: JENKINS-14494 Supports MatrixAggregator.

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java
            http://jenkins-ci.org/commit/flexible-publish-plugin/22d147c19a151d1942a4f5d6dc3bf252b2a775a1
            Log:
            JENKINS-14494 compatibility of the constructor of ConditionalPublisher.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java http://jenkins-ci.org/commit/flexible-publish-plugin/22d147c19a151d1942a4f5d6dc3bf252b2a775a1 Log: JENKINS-14494 compatibility of the constructor of ConditionalPublisher.

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java
            src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/config.jelly
            http://jenkins-ci.org/commit/flexible-publish-plugin/99e2d375f166e1e1ff02a40f74d08bf354380e71
            Log:
            JENKINS-14494 use ${it} instead of Stapler.getCurrentRequest().findAncestorObject()

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java src/main/resources/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher/config.jelly http://jenkins-ci.org/commit/flexible-publish-plugin/99e2d375f166e1e1ff02a40f74d08bf354380e71 Log: JENKINS-14494 use ${it} instead of Stapler.getCurrentRequest().findAncestorObject()

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexiblePublisher.java
            src/test/java/org/jenkins_ci/plugins/flexible_publish/AggregationRecorder.java
            src/test/java/org/jenkins_ci/plugins/flexible_publish/MatrixAggregationTest.java
            http://jenkins-ci.org/commit/flexible-publish-plugin/d172222f1b743581acb1ca8c899616bddde1f31f
            Log:
            [FIX JENKINS-14494] Tests for Matrix Support.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexiblePublisher.java src/test/java/org/jenkins_ci/plugins/flexible_publish/AggregationRecorder.java src/test/java/org/jenkins_ci/plugins/flexible_publish/MatrixAggregationTest.java http://jenkins-ci.org/commit/flexible-publish-plugin/d172222f1b743581acb1ca8c899616bddde1f31f Log: [FIX JENKINS-14494] Tests for Matrix Support.

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java
            src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexiblePublisher.java
            http://jenkins-ci.org/commit/flexible-publish-plugin/4b03cee2f35acac2018237871495cb49897908ea
            Log:
            JENKINS-14494 Removed unnecessary imports.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jenkins_ci/plugins/flexible_publish/ConditionalPublisher.java src/main/java/org/jenkins_ci/plugins/flexible_publish/FlexiblePublisher.java http://jenkins-ci.org/commit/flexible-publish-plugin/4b03cee2f35acac2018237871495cb49897908ea Log: JENKINS-14494 Removed unnecessary imports.

            Code changed in jenkins
            User: ikedam
            Path:
            pom.xml
            http://jenkins-ci.org/commit/flexible-publish-plugin/6b8fb4023efc2b50f456bd53f914ca95813db4ff
            Log:
            JENKINS-14494 Make compilable with JDK 1.7.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: pom.xml http://jenkins-ci.org/commit/flexible-publish-plugin/6b8fb4023efc2b50f456bd53f914ca95813db4ff Log: JENKINS-14494 Make compilable with JDK 1.7.
            ikedam ikedam added a comment -

            I added this feature in flexible-publish-0.11.
            Please try, and report issues if something wrong.

            ikedam ikedam added a comment - I added this feature in flexible-publish-0.11. Please try, and report issues if something wrong.
            wh WH added a comment -

            Jenkins LTS 1.532.1
            Flexible publisher plugin 0.12
            Jenkins Subversion Tagging Plugin 1.16

            I have a matrix job with 2 labels and the flexible publisher as post build action.
            I checked the check butten "Condition for matrix aggregation", set "Run on parent?" to "Always" and set "Perform subversion tagging on successful build" as action.

            Result: The matrix parent job performs no tagging! The parent jobs console output even shows no output from the flexible publisher plugin.

            Originally I hoped the new matrix support will solve this problem: https://issues.jenkins-ci.org/browse/JENKINS-9683

            wh WH added a comment - Jenkins LTS 1.532.1 Flexible publisher plugin 0.12 Jenkins Subversion Tagging Plugin 1.16 I have a matrix job with 2 labels and the flexible publisher as post build action. I checked the check butten "Condition for matrix aggregation", set "Run on parent?" to "Always" and set "Perform subversion tagging on successful build" as action. Result: The matrix parent job performs no tagging! The parent jobs console output even shows no output from the flexible publisher plugin. Originally I hoped the new matrix support will solve this problem: https://issues.jenkins-ci.org/browse/JENKINS-9683
            ikedam ikedam added a comment -

            Subversion Tagging Plugin does not support running on matrix parents.
            Even without Flexible Publisher plugin, your job should not run as expected.
            Flexible Publisher plugin does not make a publisher who does not support matrix projects support them.

            Anyway, Create a new ticket.

            ikedam ikedam added a comment - Subversion Tagging Plugin does not support running on matrix parents. Even without Flexible Publisher plugin, your job should not run as expected. Flexible Publisher plugin does not make a publisher who does not support matrix projects support them. Anyway, Create a new ticket.

            People

              ikedam ikedam
              owenmehegan Owen Mehegan
              Votes:
              6 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: