Status badges per workflow

#1

It’d be great to have status badges per workflow to separate status for distinct targets (acceptance tests & unit tests, for example).

1 Like

#2

Just wanted to mention that per-branch badges are available, but of course per-workflow ones might also be useful.

Thanks for the #feature-request!

0 Likes

#3

I think this is very useful.

I have a workflow that is triggered by a github pull request.
In this case, if all test pass, the build it will pass.

1 Like

#4

I would use this to create a table of:

| Build | iPhone 8 | iPhone X | iPad Air | iPad Pro |
±------±-----------±------------±-----------±-----------|
alpha | pass badge | fail badge | pass | fail |
beta | …
prod | …

I.e. each badge would be based on a specific workflow (in this case, a scheduled nightly build)

0 Likes

#5

Just want to amplify this. Since we have a “test” and a “deploy” workflow, and the “deploy” workflow triggers on tags, the status badge shows the status of the last “deploy”, not the latest build in the master branch. The status badge is essentially useless for us.

It’s likely that tags should not be included in the status of a branch for the status badge. But the ability to specify a workflow name would do the job well enough.

2 Likes

#6

For users with a monorepo configuration, containing multiple apps, the status badge without the ability to pass a specific workflow id unfortunately doesn’t provide much value :confused:

0 Likes

#7

Hi @natanrolnik_hz
Thank you for reaching out to Bitrise Support.
Can I have the use case for this feature so that I can get that to the Product Team?

Thanks
Chaitanya

0 Likes

#8

Hi @chaitanya.tanna, thanks for your reply.

In our monorepo, we build each one of the 2 apps using 2 different workflows. We have Consumer-OnCommit and Pro-OnCommit, which are triggered per push in the develop branch, besides the release branches which run 2 other workflows. I wanted to have in our repository the badges for each one of the workflows. Currently, the badge for develop returns the state of the last build, but this doesn’t say much. Passing a Workflow ID (by itself or together with a branch name) is essential for achieving this.

Also, if the status.json API would be able to receive a workflow (with or without a branch name), creating dashboards would be much easier to do than building the same with the current build APIs.

Hope that’s clear :slight_smile:

0 Likes

#9

Hi @natanrolnik_hz
Thank you for the details. It’s very helpful.
I will get this over to the Product Team as a feature request.

Thanks
Chaitanya

1 Like

#10

For anyone interested in this, I’ve wrote a blog post explaining how you can create your own badges by fetching the Bitrise API (not the Badge API). My solution uses Swift running on AWS Lambda.

I would ideally want the Bitrise Badge API to support different workflow ids, but until that happens, this might do the work instead:

0 Likes

#11

Such a feature would definitely be useful!

My team would like to have a dedicated workflow just for testing purposes (e. g. testing on a new stack), that doesn’t cause changes to the main badge. For this specific variant of the feature, a flag within the bitrise.yml could be used:

meta:
  bitrise.io:
    affects_main_badge: false
0 Likes

#12

I was looking for a solution too and ended up by creating a simple service with Firebase Cloud Functions to create and save custom badges.

I published the source code in a public repo called FireBadge:

I hope this will help other teams :slight_smile:

0 Likes