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

BuildTrigger in Flexible Publish doesn't work since Jenkins 1.501

    XMLWordPrintable

Details

    Description

      Config set to "Build other projects" (trigger only if build is stable)

      Log shows:

      Strings match run condition: string 1=[ref-updated], string 2=[ref-updated]
      Strings match run condition: string 1=[master], string 2=[master]
      Run condition [And] enabling perform for step [Build other projects]

      It's the last step and build is stable, but the other job is NOT triggered. The other job takes one optional argument, but it's never triggered by this plugin.

      Attachments

        Activity

          wernight wernight added a comment - - edited

          I created an new job with only this plugins and it still doesn't trigger:

          Building on master in workspace /var/lib/jenkins/jobs/dummy/workspace
          Run condition [Always] enabling prebuild for step [Build other projects]
          Run condition [Always] enabling perform for step [Build other projects]
          Finished: SUCCESS

          Also Jenkins log shows no error.

          wernight wernight added a comment - - edited I created an new job with only this plugins and it still doesn't trigger: Building on master in workspace /var/lib/jenkins/jobs/dummy/workspace Run condition [Always] enabling prebuild for step [Build other projects] Run condition [Always] enabling perform for step [Build other projects] Finished: SUCCESS Also Jenkins log shows no error.
          ikedam ikedam added a comment -

          It reproduces in my environment.

          Please use Parameterized Trigger Plugin instead for now.

          1. Install Parameterized Trigger Plugin from update center.
          2. Replace "Build other projects" in Flexible Publish with "Trigger parameterized build on other projects".
          3. Check "Trigger build without parameters"

          (Changed the priority to Major as there's a workaround)

          ikedam ikedam added a comment - It reproduces in my environment. Please use Parameterized Trigger Plugin instead for now. Install Parameterized Trigger Plugin from update center. Replace "Build other projects" in Flexible Publish with "Trigger parameterized build on other projects". Check "Trigger build without parameters" (Changed the priority to Major as there's a workaround)
          ikedam ikedam added a comment -

          It worked on Jenkins 1.480.3.
          Something should have been changed in Jenkins core between 1.480.3 and 1.509.2.

          ikedam ikedam added a comment - It worked on Jenkins 1.480.3. Something should have been changed in Jenkins core between 1.480.3 and 1.509.2.
          ikedam ikedam added a comment -

          So bad.
          The name of interface "DependecyDeclarer" has been changed in 1.509.1.
          https://github.com/jenkinsci/jenkins/commit/e451687beb547a64664803ce44a0bbf1938251ca

          ikedam ikedam added a comment - So bad. The name of interface "DependecyDeclarer" has been changed in 1.509.1. https://github.com/jenkinsci/jenkins/commit/e451687beb547a64664803ce44a0bbf1938251ca
          ikedam ikedam added a comment -

          1.509.1 1.501

          I need upgrade the target Jenkins version to fix this, but it doesn't feel reasonable to break compatibility only for that...

          ikedam ikedam added a comment - 1.509.1 1.501 I need upgrade the target Jenkins version to fix this, but it doesn't feel reasonable to break compatibility only for that...
          ikedam ikedam added a comment - This would work both for Jenkins < 1.501 and >= 1.501. http://javadoc.jenkins-ci.org/hudson/util/DescribableList.html#buildDependencyGraph(hudson.model.AbstractProject,%20hudson.model.DependencyGraph )
          wernight wernight added a comment -

          Thanks for taking a look.

          I cannot use "Parameterized Trigger" from within a Flexible block (I see no such option). Using just Parameterized Trigger works, but it's unconditional.

          wernight wernight added a comment - Thanks for taking a look. I cannot use "Parameterized Trigger" from within a Flexible block (I see no such option). Using just Parameterized Trigger works, but it's unconditional.
          ikedam ikedam added a comment -

          "Trigger parameterized build on other projects" appears in "Action" of "Flexible publish" in my environment, Jenkins 1.583 + Flexible Publish 0.12 + Parameterized Trigger 2.25.

          If it doesn't appear even if you restart your Jenkins, please create another issue and report details.

          ikedam ikedam added a comment - "Trigger parameterized build on other projects" appears in "Action" of "Flexible publish" in my environment, Jenkins 1.583 + Flexible Publish 0.12 + Parameterized Trigger 2.25. If it doesn't appear even if you restart your Jenkins, please create another issue and report details.
          ikedam ikedam added a comment - https://github.com/jenkinsci/flexible-publish-plugin/pull/4
          wernight wernight added a comment -

          I confirm the workaround (using Parameterized Trigger together with Flexible Trigger) to be working.

          wernight wernight added a comment - I confirm the workaround (using Parameterized Trigger together with Flexible Trigger) to be working.

          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/cbb69ce22f41f251f3d300508e354867ea49e802
          Log:
          [FIXED JENKINS-25017] Also work for Depende*n*cyDeclarer introduced in Jenkins 1.501.

          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/cbb69ce22f41f251f3d300508e354867ea49e802 Log: [FIXED JENKINS-25017] Also work for Depende*n*cyDeclarer introduced in Jenkins 1.501.

          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/6b9f980f351ecdfddf0a92b7486f482f84040090
          Log:
          Merge pull request #4 from ikedam/feature/JENKINS-25017_DpendencyDeclarer

          JENKINS-25017 Also work for Depende*n*cyDeclarer introduced in Jenkins 1.501.

          Compare: https://github.com/jenkinsci/flexible-publish-plugin/compare/7c0d2dfc1cb9...6b9f980f351e

          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/6b9f980f351ecdfddf0a92b7486f482f84040090 Log: Merge pull request #4 from ikedam/feature/ JENKINS-25017 _DpendencyDeclarer JENKINS-25017 Also work for Depende*n*cyDeclarer introduced in Jenkins 1.501. Compare: https://github.com/jenkinsci/flexible-publish-plugin/compare/7c0d2dfc1cb9...6b9f980f351e
          ikedam ikedam added a comment -

          Let me have a few more weeks to release a new version fixing this issue.
          I plan to include a fix for another issue.

          ikedam ikedam added a comment - Let me have a few more weeks to release a new version fixing this issue. I plan to include a fix for another issue.
          ikedam ikedam added a comment -

          Fixed in 0.13.
          It will be available in a day.
          Please try that.

          ikedam ikedam added a comment - Fixed in 0.13. It will be available in a day. Please try that.

          People

            ikedam ikedam
            wernight wernight
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: