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

Promoted Builds plugin should pass actual/"root" job to Git plublisher

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: promoted-builds-plugin
    • Labels:
      None
    • Environment:
      CentOS 5.8 SunJDK 1.7.0_03-b04 and Fedora 15 OpenJDK 1.6.0_22 both on x86-64.
      Both Jenkins 1.462.
      Both Git Plugin 1.1.18
      Both Promoted Builds Plugin 2.5
    • Similar Issues:

      Description

      The Promoted Builds plugin should pass the actual job instance to the Git Publisher perform() when performing post-promote action.

      I wondered why publishing Git tags did not work as post promote action and debugged the code a bit.

      The promotion will fail with

      Promoting JOBNAME #13
      failed build hudson.plugins.git.GitPublisher@7cdd86df SUCCESS
      Finished: FAILURE

      In the class GitPublisher I see build.getProject() returns a project instance pointing to the build and promote. the getScm() then will of course return a NullSCM. I think getProject() should return the base/actual job so that the Git publisher wil refer to the correct project.

      A Git Publisher setup as post build action works quiet fine.

        Attachments

          Issue Links

            Activity

            Hide
            alucas Anthony Lucas added a comment - - edited

            Is there anything blocking the resolution of this bug? It's a pretty big one, and would really improve the usefulness of this plugin for git-based projects.

            Show
            alucas Anthony Lucas added a comment - - edited Is there anything blocking the resolution of this bug? It's a pretty big one, and would really improve the usefulness of this plugin for git-based projects.
            Hide
            drazzib drazzib added a comment -

            JENKINS-13751 seems to be a duplicate of JENKINS-12659

            Show
            drazzib drazzib added a comment - JENKINS-13751 seems to be a duplicate of JENKINS-12659
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Nick Caley
            Path:
            src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
            http://jenkins-ci.org/commit/promoted-builds-plugin/4624722341cf34cab83f00029ac9ddf7163e6be1
            Log:
            [FIXED JENKINS-13751] Allow reference to base SCM in promotion process

            Previously, plugins such as the Git Publisher would not work in promotion processes because the SCM reference would be
            empty.

            This just makes a change to get the base job's SCM when getSCM is called on the promotion process, allowing the use of
            steps such as the Git Publisher in promotion processes.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nick Caley Path: src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java http://jenkins-ci.org/commit/promoted-builds-plugin/4624722341cf34cab83f00029ac9ddf7163e6be1 Log: [FIXED JENKINS-13751] Allow reference to base SCM in promotion process Previously, plugins such as the Git Publisher would not work in promotion processes because the SCM reference would be empty. This just makes a change to get the base job's SCM when getSCM is called on the promotion process, allowing the use of steps such as the Git Publisher in promotion processes.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
            http://jenkins-ci.org/commit/promoted-builds-plugin/350f706e3157e7b1a07778bfcb0e518bee4e3246
            Log:
            Merge pull request #73 from spudfkc/fix-no-scm-in-promotion

            [FIXED JENKINS-13751] - PromotionProcess returns SCM of its owner

            Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/069d9fd258ec...350f706e3157

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java http://jenkins-ci.org/commit/promoted-builds-plugin/350f706e3157e7b1a07778bfcb0e518bee4e3246 Log: Merge pull request #73 from spudfkc/fix-no-scm-in-promotion [FIXED JENKINS-13751] - PromotionProcess returns SCM of its owner Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/069d9fd258ec...350f706e3157
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
            http://jenkins-ci.org/commit/promoted-builds-plugin/2c3a25e734283008995fe642d130cc2a71f030f5
            Log:
            Revert "[FIXED JENKINS-13751] - PromotionProcess returns SCM of its owner"

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java http://jenkins-ci.org/commit/promoted-builds-plugin/2c3a25e734283008995fe642d130cc2a71f030f5 Log: Revert " [FIXED JENKINS-13751] - PromotionProcess returns SCM of its owner"
            Hide
            trinition trinition added a comment -

            I strongly suspect this change is what causes my previously very fast promotion (1-2s) to now take much longer (30-45s) because it's now executing four commands against my SCM (my SCM plugin is a horribly inefficient wrapper around a command line process).

            Show
            trinition trinition added a comment - I strongly suspect this change is what causes my previously very fast promotion (1-2s) to now take much longer (30-45s) because it's now executing four commands against my SCM (my SCM plugin is a horribly inefficient wrapper around a command line process).
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java
            http://jenkins-ci.org/commit/promoted-builds-plugin/8497c85d1a1974d32edad34ab9d39301ca6b5e31
            Log:
            Merge pull request #79 from jenkinsci/revert-73-fix-no-scm-in-promotion

            [FIXED JENKINS-32006] - Revert "[FIXED JENKINS-13751] - PromotionProcess returns SCM of its owner"

            Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/f0bbda7e65da...8497c85d1a19

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/promoted_builds/PromotionProcess.java http://jenkins-ci.org/commit/promoted-builds-plugin/8497c85d1a1974d32edad34ab9d39301ca6b5e31 Log: Merge pull request #79 from jenkinsci/revert-73-fix-no-scm-in-promotion [FIXED JENKINS-32006] - Revert " [FIXED JENKINS-13751] - PromotionProcess returns SCM of its owner" Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/f0bbda7e65da...8497c85d1a19
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix will be reverted in 2.24.1

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix will be reverted in 2.24.1

              People

              • Assignee:
                Unassigned
                Reporter:
                tholewebgods Thomas Lehmann
              • Votes:
                10 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated: