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

Promoted Builds Plugin tries to fetch changes from SCM

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • promoted-builds-plugin
    • None
    • Jenkins 1.625.2 on RHEL7

      The promoted builds plugin will try to fetch changes from Git even though the promotion is being executed on a node without the original workspace.

      This happens after upgrading the promoted builds plugin from 2.23.1 to 2.24.

      After downgrading the plugin to 2.23.1 everything works fine.

          [JENKINS-32006] Promoted Builds Plugin tries to fetch changes from SCM

          Jason Swager added a comment -

          Same thing happened to me. It's rather annoying, since it pollutes the workspace of the promotion.

          The problem becomes show stopper when the GIT SCM of the original job uses a specific credential to clone from the repo. The promotion gets the repo information, but not the credential, so the clone fails.

          Jason Swager added a comment - Same thing happened to me. It's rather annoying, since it pollutes the workspace of the promotion. The problem becomes show stopper when the GIT SCM of the original job uses a specific credential to clone from the repo. The promotion gets the repo information, but not the credential, so the clone fails.

          Oleg Nenashev added a comment -

          I suspect it has been somehow caused by https://github.com/jenkinsci/promoted-builds-plugin/pull/73

          Oleg Nenashev added a comment - I suspect it has been somehow caused by https://github.com/jenkinsci/promoted-builds-plugin/pull/73

          Will Saxon added a comment -

          This also breaks promotion if the Git config uses variables defined at runtime, e.g. some of our build jobs set the repository using an environment variable (via env-inject) or input parameter. These aren't available to the promotion, and so the clone fails.

          I think this new behavior is only useful in the specific scenario outlined in JENKINS-13751 and JENKINS-12659, i.e. you want to control tag creation via a promotion process. This doesn't seem like it would be a common scenario, so in my opinion it would be better if it was not the default behavior; in other scenarios, having the git overhead is not helpful at all and introduces new opportunities for failure.

          Will Saxon added a comment - This also breaks promotion if the Git config uses variables defined at runtime, e.g. some of our build jobs set the repository using an environment variable (via env-inject) or input parameter. These aren't available to the promotion, and so the clone fails. I think this new behavior is only useful in the specific scenario outlined in JENKINS-13751 and JENKINS-12659 , i.e. you want to control tag creation via a promotion process. This doesn't seem like it would be a common scenario, so in my opinion it would be better if it was not the default behavior; in other scenarios, having the git overhead is not helpful at all and introduces new opportunities for failure.

          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

          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

          Daniel Beck added a comment -

          Stupid bot is stupid.

          Daniel Beck added a comment - Stupid bot is stupid.

            oleg_nenashev Oleg Nenashev
            olesu Ole Kristian Sunde
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: