Closed kardashov closed 2 years ago
We use multi-branch workflow in Concourse similar to what is described here https://concourse-ci.org/multi-branch-workflows.html.
When build-status-resource is used from inside instanced pipeline, it generates invalid url.
For example, when there is an instance variable "git-branch", build status link should look like this:
https://myconcourse.org/teams/myteam/pipelines/my-service_branches/jobs/run-tests-my-service/builds/5?vars.git-branch=%22mybranch%22 (note url parameters ?vars.git-branch=%22mybranch%22)
https://myconcourse.org/teams/myteam/pipelines/my-service_branches/jobs/run-tests-my-service/builds/5?vars.git-branch=%22mybranch%22
?vars.git-branch=%22mybranch%22
and NOT https://myconcourse.org/teams/myteam/pipelines/my-service_branches/jobs/run-tests-my-service/builds/3 (this URL lead to non-existing job)
https://myconcourse.org/teams/myteam/pipelines/my-service_branches/jobs/run-tests-my-service/builds/3
I propose to addionaly check if $BUILD_PIPELINE_INSTANCE_VARS is present and add respective URL parameters to generated Concourse url: https://github.com/SHyx0rmZ/bitbucket-build-status-resource/blob/master/scripts/out#L73
I have merged your pull request and released v1.6.0. Thanks for taking care of this!
v1.6.0
We use multi-branch workflow in Concourse similar to what is described here https://concourse-ci.org/multi-branch-workflows.html.
When build-status-resource is used from inside instanced pipeline, it generates invalid url.
For example, when there is an instance variable "git-branch", build status link should look like this:
https://myconcourse.org/teams/myteam/pipelines/my-service_branches/jobs/run-tests-my-service/builds/5?vars.git-branch=%22mybranch%22
(note url parameters?vars.git-branch=%22mybranch%22
)and NOT
https://myconcourse.org/teams/myteam/pipelines/my-service_branches/jobs/run-tests-my-service/builds/3
(this URL lead to non-existing job)I propose to addionaly check if $BUILD_PIPELINE_INSTANCE_VARS is present and add respective URL parameters to generated Concourse url:
https://github.com/SHyx0rmZ/bitbucket-build-status-resource/blob/master/scripts/out#L73