Comments (28)
Same issue here. It seems like creating a job comes with its own all blanked out Trigger Setup. If you go in the job configuration, then click "Trigger Setup...", it will show all blank fields, which will cause the defaults to take action. If you then delete that Trigger Setup and add back a new one (Trigger Setup --> Add --> "Update commit status during build"), it will have the correct fields (coming from those in the Configure System page).
from ghprb-plugin.
To be clear: I replicated the behavior by not configuring the job config at all but instead only configuring the global config. I can't give you the config I used.
I fixed my own issues by configuring it in each job.
from ghprb-plugin.
Unfortunately, the described workaround (setting Context in each job) does not work for me.
To understand the problem, i did the following:
- set "jenkins-global" as Context in the global jenkins config
- set "jenkins-tests-only" and "jenkins-code-analysis" as Context in job-specific configurations (there are only those two jobs)
Now, all my pull requests show 4 checks: "default", "jenkins-global", "jenkins-tests-only", "jenkins-code-analysis" (see attached image)
"jenkins-global" is never shown as finished, though. "default" seems to take the same state as one of my actual jobs (also the Url is the same then). It seems to be updated with every update of a job. The job finishing last threrefore determines the final state of the "default" check (it will have the same state as the last finishing job).
Leaving Context empty in global config reduces it to 3 checks: "default", "jenkins-tests-only", "jenkins-code-analysis". Still wrong, though...
I'm using version 1.35.0 of the plugin.
from ghprb-plugin.
@anton-unity Ahh thank you for the screenshots. The extra pixels on the bottom of the job screenshot helped me understand how you'd configured the job. I can now happily (?) report that I can reproduce the problem. In my set-up, I was setting the job-specific configuration in the Trigger Setup...
section of the job.
FWIW as a temporary workaround, you could try setting the job-specific context in the Trigger Setup section. (Let me know if that helps?) I'll see if I can unwind what's going on in the particular use-case where I can reproduce the problem.
Screenshots below: (1) a screenshot just showing an example of where I set it up when I could not reproduce it. Then (2) a screenshot showing that I was able to reproduce it using your configuration.
from ghprb-plugin.
Seems like this bug has also been reported in JIRA:
https://issues.jenkins-ci.org/browse/JENKINS-29151
from ghprb-plugin.
This is cause by this line: https://github.com/jenkinsci/ghprb-plugin/blob/ghprb-1.27/src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java#L94 I will have it fixed in the next release.
from ghprb-plugin.
@DavidTanner Awesome. Do you expect a release anytime soon?
Also, related to this, it seems like there's no way currently to not have a Commit Status URL. E.g. I don't want any "Details" link at all on the PR's webpage. I can get this to work if I specify a simple space " " in that field in the Configure System page, but then when I do the steps described in my previous comment on the job configuration page to get back those defaults, the space is not copied over (trimmed out probably), and thus, the default URL gets used.
Hopefully, these two bugs are related. I.e. once we no longer have to fiddle with specific job configurations and instead rely on the main system configuration, each individual job without a Trigger Setup created will just lookup those central values without trimming anything, so that even a single blank space is kept.
from ghprb-plugin.
How about if the url is set to --none--
then the url is set to ""
?
from ghprb-plugin.
Actually, it seems like the issue is more grave than I thought. The Commit Status URL doesn't seem to be copied over at all when adding a Trigger Setup on the job configuration page. I had a assumed previously it was because I used a simple space. But even when using "--none--" now (or even a real URL), it seems like it doesn't get copied over.
from ghprb-plugin.
There is no --none-- currently. I am working on fixing the defaults.
from ghprb-plugin.
So this did not work globally for me but it did work when I put the settings in there for a specific job, so my issue is solved even though there may be a larger problem at play.
from ghprb-plugin.
I ran into a permutation of this today. I am able to set these values correctly via the Web UI, but when uploading generated configuration via the Jenkins Job Builder tool (which is just posting an XML file to the API), everything under SimpleStatus
appears to be lost.
from ghprb-plugin.
Actually, I might be hitting a distinct issue
from ghprb-plugin.
This issue should be fixed in the latest release.
from ghprb-plugin.
I confirm this still is an issue with ghprb 1.30.1.
from ghprb-plugin.
@samrocketman can you post your job config and the global plugin config?
from ghprb-plugin.
This is still an issue as of ghprb-1.35.0
from ghprb-plugin.
@bskrtich is the issue similar to what's described: something you can work around if you override the default on each job?
from ghprb-plugin.
Yes the issue is very similar. If you change the Context in the global settings, it will be added to the PR at the start, but at some point durning the build it will send "default" as the Context. This all can be worked around by setting the Context in each job.
from ghprb-plugin.
Can confirm workaround does not work for me as well. 1.35.0
Looks like 'Commit Status Build Result' jenkins configuration is always using 'default', instead of value from 'Commit Status Context' (which is actually used only for build triggered status)
from ghprb-plugin.
@benpatterson sorry, but do you know is someone working on this? Just bringing some attention to the issue
from ghprb-plugin.
@anton-unity I am looking at it this morning and am unable to reproduce. :(
I wonder what version of the github plugin you're using, just out of curiosity? We upgraded that dependency with 1.35.
More details: I'm setting only the context in the global configuration (not the url or anything like that, in part to simplify), and I'm setting a specific context in a ghprb job. Only the specific job's context is appearing throughout the cycle (on trigger, on start, on complete). FWIW the job is configured to pass.
from ghprb-plugin.
Oh I should also point out that my dev environment is on a jenkins 2.x install
from ghprb-plugin.
I tried it once again now with such setup - plugin v1.35 and jenkins 2.19.x.
For global configuration only context context-global
, for job only context context-job
.
That's result after job completed:
from ghprb-plugin.
I will try fresh jenkins+plugin instance early next week (just to make sure there is no weird dependencies issue) and post results here.
from ghprb-plugin.
@benpatterson thank you for your reply! Indeed, I confirm Job -> Trigger Setup
context work as expected and solved my problem with single job. Sorry, I was a bit confused by few concurrent options...
This is my result with configured trigger setup (and any global configuration):
from ghprb-plugin.
I am closing this, because this seems to work if properly configured.
If anyone wants to provide a documentation patch that would be much appreciated.
from ghprb-plugin.
I think this needs to be reopened, as setting the global config context still results in default
.
from ghprb-plugin.
Related Issues (20)
- Unable to connect to GitHub HOT 2
- Worker nodes aren't started when pipeline requests to run parallel parts on same node
- Log4j in ghprb? HOT 1
- Trigger based on directories HOT 1
- Pull request approval without fetch
- usage of org-list may incur github rate limit
- Publish multiple github-statuses from the same pipeline job HOT 1
- ${ghprbActualCommit} does not pick up current commit from hook if an additional branch is specified. HOT 2
- Create new pull request with a comments,but not be triggered. Comment a gain and reopen the pull request,then be triggered
- Restrict Specific branch for Pull request
- What kind of "actions" does the Pull request Webhook of the Github pull request builder support?
- What kind of "actions" does the Pull request Webhook of the Github pull request builder support? HOT 1
- Plug-in Question
- Changing the status context (name) in the config while a job is running leaves the old status in pending forever
- Changing(rotating) plugin credentials take no effect until Jenkins is restarted due to cached repo object
- Is this plugin is not maintained anymore? if so, is there any alternative plugin for it ? HOT 1
- Can Help WIth Plugin Upgrade
- Warning: The currently installed plugin version may not be safe to use. Please review the following security notices:
- Not able to trigger jenkins job by adding specific labels
- When A PR is not mergeable the Github status check does not get updated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghprb-plugin.