view rawmain.go hosted with by GitHub
Posted: Mon Dec 23, 2024 5:08 am
Note that we used log from go-utils to print a colored message. In case of success we don’t need to explicitly exit with code 0 since it’s the default value. Moreover exporting needs to be done using envman which adds it to the envstore accessible by next steps. If we just set the environment variable for the current process it will be lost after step finishes. Keep in mind that output should be declared in step.yml in order to be visible in workflow editor. By convention output names are written using upper snakecase:
outputs:
- CHUCK_NORRIS_JOKE:
opts:
title: "Random Chuck Norris joke text"
summary: Random joke about Chuck Norris from API
view rawstep.yml hosted with by GitHub
Step properties
By default, when step on Bitrise fails bulgaria phone number then the whole build is considered failed, and next steps are not executed. Those behaviors do not match our use case. We want to get the joke always (even if some of the previous steps has failed) and we don’t want those failures during getting jokes to affect the overall build result. E.g. user rather won’t be happy that pull request status check has failed only due to the error during downloading Chuck Norris joke and PR cannot be merged.
need to adjust step configuration by setting is_always_run and is_skippable to true. The first one tells that step should be started even build is marked as failed (some of the previous steps has failed). The user will be able to override that setting in the workflow editor. Skippable step means that its failures won’t affect overall build status – it can be still successful. If one really needs a joke, it is possible to override that setting in bitrise.yml configuration file.
NEED A SUCCESSFUL TEAM?
We’re 100% office based team with 7-years’ experience
in mobile & web app development
outputs:
- CHUCK_NORRIS_JOKE:
opts:
title: "Random Chuck Norris joke text"
summary: Random joke about Chuck Norris from API
view rawstep.yml hosted with by GitHub
Step properties
By default, when step on Bitrise fails bulgaria phone number then the whole build is considered failed, and next steps are not executed. Those behaviors do not match our use case. We want to get the joke always (even if some of the previous steps has failed) and we don’t want those failures during getting jokes to affect the overall build result. E.g. user rather won’t be happy that pull request status check has failed only due to the error during downloading Chuck Norris joke and PR cannot be merged.
need to adjust step configuration by setting is_always_run and is_skippable to true. The first one tells that step should be started even build is marked as failed (some of the previous steps has failed). The user will be able to override that setting in the workflow editor. Skippable step means that its failures won’t affect overall build status – it can be still successful. If one really needs a joke, it is possible to override that setting in bitrise.yml configuration file.
NEED A SUCCESSFUL TEAM?
We’re 100% office based team with 7-years’ experience
in mobile & web app development