Run Steps Only On Failed Builds

#1

Bitrise Build Issue Report template

Description of the issue

I am trying to send a slack message, but only want to do so on failed builds. I have found other forums saying to use

run_if: “.IsBuildFailed”

But we are still getting slack notifications when no build steps fail (successful build). I tried adding the

is_always_run: true

condition as some suggested, but it had no affect either.

Environment:

This is happening on the Android/Linux stack and the XCode 11.5.x Catalina stack.

Which build Step causes the issue and which version of the step?

This is happening for the Slack Message step but seems to be a larger issue of only running a step if a previous step has failed the build.

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Always happened

Build log

Here is the bitrise.yml for the step.

slack-testing:
steps:
- slack@3:
inputs:
- channel: “#some-channel
- from_username: Bitrise Testing
- fields: |
Branch|${BITRISE_GIT_BRANCH}
Workflow|${BITRISE_TRIGGERED_WORKFLOW_ID}
- buttons: |
View Build|${BITRISE_BUILD_URL}
Install Page|${BITRISE_PUBLIC_INSTALL_PAGE_URL}
- channel_on_error: “#some-channel
- from_username_on_error: Bitrise Testing
- color_on_error: “#dc1414
- webhook_url: “$SLACK_TESTING_WEBHOOK”
run_if: “.IsBuildFailed”

1 Like

closed #2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes