I keep seeing this in CLI:
WARN[11:58:07] The step’s (deploy-to-bitrise-io) Run-If expression evaluated to false - skipping
INFO[11:58:07] The Run-If expression was: .IsCI
I need to run this step to see the logs.
I keep seeing this in CLI:
WARN[11:58:07] The step’s (deploy-to-bitrise-io) Run-If expression evaluated to false - skipping
INFO[11:58:07] The Run-If expression was: .IsCI
I need to run this step to see the logs.
Hi @kausi,
Thanks for asking this here!
The run_if
statements are a mechanism provided by the CLI to let Steps (or you, in your bitrise.yml
) specify a condition. The Step is only performed if that condition is met (if the expression evaluates to “true”). Related docs: http://devcenter.bitrise.io/tips-and-tricks/disable-a-step-by-condition/ and for “IsCI” directly: http://devcenter.bitrise.io/tips-and-tricks/disable-a-step-by-condition/#run-a-step-only-in-ci-environment-skip-it-for-local-builds
Steps can define a default value for run_if
in their step.yml
step descriptor, e.g. in this case the Deploy to Bitrise.io step’s step.yml
/ Step descriptor can be found at: https://github.com/bitrise-io/steps-deploy-to-bitrise-io/blob/master/step.yml#L21
You can overwrite this run_if
in your bitrise.yml
, simply specify e.g. run_if: true
if you want to disable the default run_if
specified for the step (you can find a bitrise.yml
example in the docs at http://devcenter.bitrise.io/tips-and-tricks/disable-a-step-by-condition/ ).
Now, in this particular case, the Deploy to Bitrise.io step is marked to only run in “CI” environment because it requires inputs which you can’t provide locally, so there’s no point in running (and failing) it on your Mac/PC. The Deploy to Bitrise.io step is designed to attach artifacts to the related build, and when you run your build locally there’s no build to attach the artifacts to.
One last note for run_if: .IsCI
- you can enable steps which are marked with .IsCI
as the run_if
expression (e.g. Git Clone, Activate SSH Key, Deploy to Bitrise.io, …) by setting the environment variable CI to true (e.g.: export CI=true
) before you’d bitrise run WORKFLOW
. Alternatively you can provide the --ci
flag for bitrise run: bitrise --ci run WORKFLOW
.
If you have any questions just let us know!