Comments (21)
#103 will give more options for updating the status. I am going to make a couple changes real quick, then publish it.
from ghprb-plugin.
@DavidTanner is this going to be affecting the "Commit Status Context" field? (The one used to distinguish between different "checkboxes" on GitHub)?
from ghprb-plugin.
@MSch I am going to have it resolve any environment variables, or defaults from the project.
from ghprb-plugin.
@DavidTanner Awesome. Appreciate it!
from ghprb-plugin.
Landed in build 1.24
from ghprb-plugin.
@DavidTanner Thanks for the quick turnaround, but I just tried it and unfortunately it doesn't fix the issue.
We have a matrix project that gets triggered by the GH PR, so this matrix project then sets the commit status context, but the individual configurations that are run by it do not set a context.
So with the latest version I can configure a commit status context of ci/ios/${MY_VARIABLE_FROM_THE_MATRIX_PROJECT}
, but this does not resolve the variable, since it only sets the commit status context on the "top-level" matrix project, not on each configuration in the matrix project.
When I actually want is a separate commit status context for every configuration in the matrix project (and ideally I could skip the commit status context for the matrix project itself, since that's not interesting for people looking at the PR)
from ghprb-plugin.
I see what you mean. In that case you want the status updated by the build manager as each completes. Currently there are only three points that interact with GitHub, trigger job, job started, and job finished.
I haven't done any work in the BuildManager code, but if you know your way around java you are welcome to add to the code in a pull request.
from ghprb-plugin.
@DavidTanner Thanks for the info. I haven't done any development on Jenkins ever, how much work do you think it is to add this?
from ghprb-plugin.
I am not sure. @mdelapenya was the one that added the support for build flows, he might be able to provide some info.
from ghprb-plugin.
HI everybody, just to clarify: @MSch, you want to have as many commit statuses as matrix configurations in the job, so you could eventually print all statuses in the comment. Something like this:
Android 2.x -> OK
Android 3.x -> FAILED
Android 4.x -> OK
Android 5.x -> OK
Where each Android version is a value on the axis
Is that correct?
from ghprb-plugin.
@mdelapenya I think so :)
I want to have as many commit status contexts as matrix configurations in the job, so that Android 2.x
, Android 3.x
, etc show up separately in the GitHub PR, just as clahub
, continuous-integration/travis
and codeclimate
do here:
so you could eventually print all statuses in the comment
Just to clarify: I want to print the statuses as "commit status context" (see image above), not in a comment on the PR or the description
field of the commit status.
from ghprb-plugin.
I took a quick look onto the code, and there is a method to write a commit status in a context
repo.createCommitStatus(sha1, state, url, message, context);
I guess calling it on each matrix configuration value will work.
Would it be enough?
from ghprb-plugin.
@mdelapenya if that resolves variables in the context string than that would be perfect, I would just set the context to android/${ANDROID_VERSION}
in the project configuration and that'd be it.
from ghprb-plugin.
The AbstractBuild object has a getVariables method.
So if you iterate through the matrix builds, then you'll have the variables on each one.
Take into account that you should move the createCommitStatus call in the onBuildComplete(...) method to the build manager, so that there could be more that one commit status, each on the context provided by the build
from ghprb-plugin.
👍 thanks!
from ghprb-plugin.
Just mention me in the pull if you want it or if you need help ;)
from ghprb-plugin.
Any progress here? We too would like the individual child jobs (the intersections of the axes) to post their own status to GitHub.
Actually, it looks like it might be somewhat working. With the config set to:
<org.jenkinsci.plugins.ghprb.upstream.GhprbUpstreamStatus plugin="[email protected]">
<showMatrixStatus>false</showMatrixStatus>
<commitStatusContext>ci/jenkins/ssi/${arch}</commitStatusContext>
<triggeredStatus></triggeredStatus>
<startedStatus></startedStatus>
<statusUrl></statusUrl>
<addTestResults>false</addTestResults>
</org.jenkinsci.plugins.ghprb.upstream.GhprbUpstreamStatus>
I get status for:
ci/jenkins/ssi/${arch}
and
ci/jenkins/ssi/x86_64
With the former showing a Details link to the parent job and the latter showing a Details link to the child job. So, really, just need the variable substitution in the parent to substitute an empty value (and suppress the final /) for an empty variable instead of the variable name.
from ghprb-plugin.
I am closing this for now. If there is still momentum in need, lets reopen and get it ouf of the door.
from ghprb-plugin.
@bjoernhaeuser I'm not sure I understand why you are closing this. This is still a very real issue for us. We have commit status' being overwritten because of this lack of being able to add which axis in the matrix it is updating for.
from ghprb-plugin.
All good! Just trying to cleanup some old issues.
Are you interested in trying to provide the PR like discussed in this issue?
from ghprb-plugin.
I wish I could. Java and hacking it in the Jenkins environment are not something I have had time to get into yet though.
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.