Closed sudoash closed 8 years ago
Did you update your refspec to +refs/pull-requests/*:refs/remotes/origin/pr/*
in the jenkins job?
This is same as this issue: https://issues.jenkins-ci.org/browse/JENKINS-34762. It is a result of a security update to Jenkins. See also https://github.com/janinko/ghprb/issues/408
Also being tracked at https://issues.jenkins-ci.org/browse/JENKINS-34847
:+1:
It is written in the JIRA issue but here's the link to the security report that introduced the breaking changes: SECURITY-170
It says that Jenkins prevents now parameters that were not defined in the job to be defined in the environment. While waiting for this plugin to adjust, you can work around this by giving Jenkins some parameters. Either you restore the previous behavior or define which parameters can go through:
GitHub Pull request builder plugin fixed this: https://github.com/jenkinsci/ghprb-plugin/pull/344 Hopefully something similar can be done for the Stash Pull Request Builder, as I think their designs are similar.
Fixed this in a branch: https://github.com/eirikwang/stash-pullrequest-builder-plugin/tree/newChange More or less the same implementation as github´s implementation Not written any tests or anything, but it now works as intended again.
Could you raise a PR
@eirikwang, any updates on this? @nemccarthy, alternatively you can initiate the pull request yourself to bring in the changes if you're ok with the patch.
Thanks guys! Sorry been on holidays in South America for the past few months. Will get to all these over the next week and get a new build out
Any update?
I submitted a PR with @eirikwang's changes!
Thanks guys. Looking at this now
So this should be available on Jenkins now?
It will require a version bump and new release to the Jenkins plugin repository. @nemccarthy, I am happy to bump to 1.7.0 and release if you like (updating the wiki), or if you prefer to do it, just let me know :)
I'm still facing this issue. My plugin version is 1.7.0 and I'm on Jenkins 2.7. Anyone noticed the same thing?
@almorelle A silly question, how do we provide that environment variable to Jenkins?
Updating the plugin to 1.7.0 worked, however we had to do a full restart of the jenkins service from the command line (not just a restart from the UI) in order for it to take effect.
I'm still facing this issue on a fresh installation of Jenkins v2.32.2 & Plugin v1.7.0 :(
P.S. Actually, the variables started to work properly until I checked both Build only if PR is mergeable
& Merge PR if build is successful
in advanced settings. However, un-checking them has no effect now (already tried to restart Jenkins). It's kinda unstable!
P.P.S. Mmmm, after playing with the advanced settings it looks like that Only build when asked (with test phrase)
option is the one that fires this issue! This doesn't make any sense I know... 😕
I'm still getting this with Jenkins 2.77 and plugin 1.7.0. I have the following options selected:
Is this fixed, and am I doing something wrong?
I am also seeing this on Jenkins 2.73.1 and plugin 1.7.0. For now I'm seeing a lot of warnings in the logs, but the parameters themselves are available to the job. Anyone else have any hints on how to get rid of the warnings (I'd rather not set the global flag, as I'd like it to warn me if there are params that shouldn't be there, but this was supposed to be fixed in the latest plugin...)
Having the same issue. Is there a way to manually set these variables?
Also still having these problems.
Jenkins version: 2.3
It seems that variables aren't being made available to Jenkins anymore resulting in the following:
Has anyone else been receiving these issues since upgrading Jenkins?