I'm trying to use the stash build api to connect Jenkins and Stash. I've got it linked up with a simple python script, but when I view the build results in Stash, it only shows the most recent result. I'm posting to <stash-url>/rest/build-status/latest/commits/<sha1> with state, key, name, and url from my jenkins job. Do I need to do something special to store each build result?
Community moderators have prevented the ability to post new answers.
Hi Matthew,
What parameters are you passing exactly? According to the documentation:
If a single commit was built by multiple build plans, you can
POSTmultiple results for the same commit. Each result must have a differentkeyattribute.
Basically if you use the same key, you'll end up with only one result. I suspect that's what might be happening.
Does that help?
Charles
PS Have you seen this Jenkins plugin before?
I was looking at the API documentation at https://developer.atlassian.com/static/rest/stash/2.6.0/stash-build-integration-rest.html. It makes sense now that the key should be unique.
That plugin did almost everything I was looking for. There doesn't appear to be a way for it to mark a build as "In Progress".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.