Comments (20)
I think you would want to use the GitHub plugin to do that. You can also append a portion of the build logs to the comment that gets made when the job fails.
https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin
http://stackoverflow.com/questions/14274293/show-current-state-of-jenkins-build-on-github-repo/26910986#26910986
from ghprb-plugin.
It looks like that will just give you the status, not a custom message.
The plugin is set up to use extensions now, so you are welcome to add one that will do just what you want, and add it to the extensions.status package.
from ghprb-plugin.
I'm sorry, I don't think I was clear. I was specifically referring to the "Details" link at the bottom of GH PRs. That link is being set to the URL of our internal Jenkins server.
Specifically, I'd like to provide a per-job value for the target_url in the JSON that is being sent back by GHPRB to set the commit status (i.e., the gist URL that I generate during my job build steps).
from ghprb-plugin.
I am pretty sure we are on the same page. The status update is what sets that details link, or the icon to the right of the commit. Right now it is just set to use the internal url, but an extension would allow that to change to whatever you want.
from ghprb-plugin.
Ah, ok.
Any suggestions for how I would do that in an extension? (forgive me; I'm unfamiliar with the GHPRB extensions...) Is there a "usual" way for a child process to pass some info back up to Jenkins (other than the exit status of the build script)?
from ghprb-plugin.
Use this file as a starting point. You just have to handle updating the status when the build is scheduled, starting, and complete.
https://github.com/jenkinsci/ghprb-plugin/blob/ghprb-1.23.2/src/main/java/org/jenkinsci/plugins/ghprb/extensions/status/GhprbSimpleStatus.java
from ghprb-plugin.
Ok, we'll have a look at that. Thanks!
from ghprb-plugin.
I think I will just add it to #103 since it hasn't been merged yet.
from ghprb-plugin.
Sweet; thank you!
Do you have a guesstimate on when this will be in a published release of GHPRB?
from ghprb-plugin.
The changes landed in build 1.24 and will be in the update center within the next few hours, whenever their process runs next.
from ghprb-plugin.
I've updated my Jenkins to use 1.24 of GHPRB and I'm a little confused at to how to do what I want.
Forgive me -- I might have used the wrong terminology to define what I want to do. I see this screenshot:
I think I said "job" earlier in this issue when I really should have said "build". I.e., I have build-specific output that I want to include in the details/status link on github (in this case, I dump my build log to a gist that is specific to that build).
from ghprb-plugin.
The "Commit Status URL" will be resolved when the plugin updates the status of a commit. If you put an environment variable in there then it will be resolved during the build
from ghprb-plugin.
How do I set an environment variable from my build steps (potentially executing on a separate slave node) that the GHPRB plugin will see?
from ghprb-plugin.
I recommend using https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin, then you can inject variables at any stage of the build using a properties file, a properties script, a groovy script, or a groovy file.
from ghprb-plugin.
Sweet. Let me go check that out.
(many thanks for your patience and all the help!)
from ghprb-plugin.
I'm checking how to use the Commit Status URL box in the GHPRB global configure section.
It doesn't seem to have any impact on the link pointed to by details
. Do I need to supply values for
the other two fields - Commit Status Build Triggered and Commit Status BuildStarted?
from ghprb-plugin.
So it looks like I forgot to add the getter for the field, so the configure page won't show the url you saved. I just fixed it locally and will release a patch, but the functionality should still work.
DavidTanner/Testing#12
Currently the last status details is for google.com, which is what I saved in the config.
from ghprb-plugin.
@jsquyres I want do the same thing as you have done, pushing our jenkins(behind firewall) console logs to a gist & then publishing it using custom url. I have figured the custom url part but i am not sure how should i push the console logs to gist. It would be great if you can let me know how you did that. Thank you
from ghprb-plugin.
@jeevandev We just use a CLI gist uploader -- https://github.com/defunkt/gist.
from ghprb-plugin.
@jsquyres perfect thanks, i was trying to do it using groovy & bash
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.