teameh / bitrise-step-bitbucket-server-post-build-status

MIT License
3 stars 8 forks source link

Key made up of `BITRISE_BUILD_SLUG` and `BITRISE_BUILD_NUMBER` #11

Closed markst closed 4 months ago

markst commented 4 months ago

We share one Bitbucket repository between two different Bitrise apps.

Build statuses reported to Bitbucket only include one of the builds triggered.

This pull request addresses an issue where build statuses from different apps were overwriting each other in Bitbucket due to non-unique key values derived solely from workflow names. I have updated the script to generate unique key identifiers by incorporating the Bitrise app slug and build number. This change ensures independent status reporting for each app, enhancing clarity and traceability in our CI/CD pipeline.

markst commented 4 months ago

Tested fork out and has fixed the issue for us:

image

image
teameh commented 4 months ago

Great, thanks for your contribution!

vivart commented 4 months ago

Hi, we are facing issue because of this change. We are using bitrise pipeline with the stages like

in 'setup' we report bitbucket with the status inprogress and in 'deploy' stage we report bitbucket with the build status. I think because build slug is different for setup and deploy now after this change we can see two separate reports on bitbucket one with inprogress and one with build status for same build number.

markst commented 4 months ago

ah very sorry about that @vivart!

perhaps we can cut BITRISE_BUILD_SLUG from the key since BITRISE_BUILD_NUMBER may be sufficient extra dimension.

vivart commented 4 months ago

yeah right for now I have changed my step from git::https://github.com/teameh/bitrise-step-bitbucket-server-post-build-status.git@master: to git::https://github.com/teameh/bitrise-step-bitbucket-server-post-build-status.git@0.0.13: