The REST API used to query the build status for a commit requires a key
Ref : https://docs.atlassian.com/bitbucket-server/rest/7.21.0/bitbucket-rest.html
/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/builds?key
parameter | value | description |
key | the key of the build status |
From what I understand the key is used while setting the build status and the same needs to be used while fetching it.
How do we find out what key was used while setting.
We are using https://plugins.jenkins.io/stashNotifier/ plugin to send the status
Using the following API call.
step([$class: 'StashNotifier',
commitSha1: "${env.commit}", // jenkins parameter that resolves to commit's hash
credentialsId: '841769bd-6936-4c5e-aa77-5214885738e0',
disableInprogressNotification: false,
ignoreUnverifiedSSLPeer: true,
includeBuildNumberInKey: false,
prependParentProjectKey: true,
projectKey: '',
stashServerBaseUrl: 'https://alm.radisys.com/bitbucket'
])
stashNotifier doesn’t seem to have an option to set the key from user.
If you could also please help me with what is the default key for the status publisher in bitbucket from stash notifier plugin,
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.