Hi there,
I have a test script consisting of 3 stages. In order, one stage runs CI tests, then one bumps the version of the software, then finally builds the app.
When deploying, we should be able to skip this version bump if we don't want to do it. Therefore, stage 3 should run if the other two stages have succeeded or skipped, but never failed.
I've got this working in GitHub Actions and am currently trying to port this over to Azure Pipelines. So far, it looks like this.
# Test stage template, leads to stage called `run_tests_stage`
- template: test-stage.yml
- stage: 'version_bump_stage'
.....
- stage: 'Build'
displayName: 'Build React Native App'
dependsOn:
- run_tests_stage
- version_bump_stage
condition: |
and(
not(canceled()),
in(dependencies.run_tests_stage.result, 'Skipped', 'Succeeded'),
in(dependencies.version_bump_stage.result, 'Skipped', 'Succeeded')
)
jobs:
- job: 'build_android'
......
Both of the first two stages always pass, yet the "Build" stage always skips. I cannot figure out why. I've been trying all day to print the outputs of these conditions, but I keep getting other errors here, likely due to my inexperience.
Where have I gone wrong here? Any answers or help with pointing me in the right direction to further debug this would be much appreciated.
Thanks! ๐