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

No build parameters are getting set after upgrading to Jenkins 2.7

      After upgrading to Jenkins 2.7 I'm facing the issue that no longer the build parameters are getting set. E.g. "destinationCommitHash" and all the other build parameters that are usually getting set by this plugin are missing.

      Hence the Jenkins job will fail as it's not able to pull the PR commit. Before upgrading to Jenkins 2.7 everything worked as expected.

       > git -c core.askpass=true fetch --tags --progress ssh://git@repo/${destinationRepositoryOwner}/${destinationRepositoryName}.git +refs/pull-requests/*:refs/remotes/origin/pr/*
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from ssh://git@repo/${destinationRepositoryOwner}/${destinationRepositoryName}.git
      	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:799)
      	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1055)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086)
      	at hudson.scm.SCM.checkout(SCM.java:485)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      	at hudson.model.Run.execute(Run.java:1741)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      

          [JENKINS-37551] No build parameters are getting set after upgrading to Jenkins 2.7

          Gary Mangum added a comment -

          I am having the same trouble. Did you ever get past this?

          I came across this, which seems to work getting past similar issues with a different plugin, but it doesn't seem to help with the Stash one: https://issues.jenkins-ci.org/browse/JENKINS-29031
          Essentially, you have to launch Jenkins with this flag:
          -Dhudson.model.ParametersAction.keepUndefinedParameters=true

          read this:
          https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2016-05-11

          Gary Mangum added a comment - I am having the same trouble. Did you ever get past this? I came across this, which seems to work getting past similar issues with a different plugin, but it doesn't seem to help with the Stash one: https://issues.jenkins-ci.org/browse/JENKINS-29031 Essentially, you have to launch Jenkins with this flag: -Dhudson.model.ParametersAction.keepUndefinedParameters=true read this: https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2016-05-11

          Ruben Martin Pozo added a comment - - edited

          Same thing is happening to me. Any idea how this issue can be solved?

          Ruben Martin Pozo added a comment - - edited Same thing is happening to me. Any idea how this issue can be solved?

          Mike L added a comment -

          Please note this is a security loophole.

          I have an rpm (yum) based install. To fix: Add -Dhudson.model.ParametersAction.keepUndefinedParameters=true` to JENKINS_JAVA_OPTIONS in /etc/sysconfig/jenkins:

          This is what I have in my configuration (headless=true was already there)

          JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.ParametersAction.keepUndefinedParameters=true"

          SysVinit: sudo service jenkins restart
          SystemD: sudo systemctl restart jenkins

          Mike L added a comment - Please note this is a security loophole. I have an rpm (yum) based install. To fix: Add -Dhudson.model.ParametersAction.keepUndefinedParameters=true ` to JENKINS_JAVA_OPTIONS in /etc/sysconfig/jenkins : This is what I have in my configuration (headless=true was already there) JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.ParametersAction.keepUndefinedParameters=true" SysVinit: sudo service jenkins restart SystemD: sudo systemctl restart jenkins

            nemccarthy nathan m
            subesokun Subeso Kun
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: