Hello Team,
I have script to check the files(list of file changes from each commit) in each step. When specific file not updated then I have to stop the build with note and build should not be mark as failure. Is there any best way do that. I have added exit 0
but build does not stop. Can some one recommend ?
For below example,
I have validatespconfig powershell script having logic to check the specific file and executed exit 0 but build continue to execute next command.
- label: “export”
commands:
- pwsh .buildkite/scripts/validatespconfig.ps1- buildkite-agent artifact upload ./exportedfile.json
key: “Export”
if: “build.branch == ‘main’”
- buildkite-agent artifact upload ./exportedfile.json
- wait
- label: “import”
commands:
- pwsh .buildkite/scripts/validatespconfig.ps1- pwsh .buildkite/scripts/importSPConfig.ps1
key: “Import”
if: “build.branch == ‘main’”
depends_on: “Export”
allow_dependency_failure: true
- pwsh .buildkite/scripts/importSPConfig.ps1