Closed ghost closed 6 years ago
I think it would be cleaner to not reuse key
here. As far as I can tell, there's basically three cases:
'{}'.format(name)
'{} #{}'.format(os.environ['BUILD_JOB_NAME'], os.environ['BUILD_NAME'])
'One-off build #{}'.format(os.environ['BUILD_ID'])
If I understand you correctly, you now are in a situation where you have two key
s, but only one BUILD_JOB_NAME
, right? I'm assuming this happens when you have two put
s in the same job?
If so, I can see the need to use key
, but we should probably do something about the automatically generated key for one-off builds.
I've updated my PR according to the various comments: thanks!
@SHyx0rmZ The problem is that (per Concourse docs) BUILD_NAME
only has "The build number within the build's job." so regardless of where you put
the resource you'll end up with a panel like the one I've attached in the first image where only numbers are shown but there's no way of telling (without clicking the link) which job those job numbers refer to.
This is way I came up with the idea to actually use BUILD_JOB_NAME
-BUILD_NAME
if the user doesn't overrides it and if both are defined (to exclude the One-off build).
@degano Updated Docker image available via tags v1.3.0
and latest
.
@SHyx0rmZ thank you!
This commit extends the "name" displayed on the Bitbucket Build status prefixing it with the "key". This has the effect that the link to the build doesn't show only the build number but also the job name, followed by the build number. It makes easier to distinguish the jobs in a pipeline containing more of them.
Before this commit:
With this commit: