I have a simple gitlab config:
variables:
P7_TESTING_INSTALLATION_PATH: D:Logos_block_gitlab_runnerpSeven-v2024.05
stages:
- cleanup
- installation
cleanup_build:
tags:
- block_autotest
variables:
ErrorActionPreference: stop
allow_failure: false
stage: cleanup
script:
- Invoke-Expression -Command "$env:P7_TESTING_INSTALLATION_PATHclientp7batch.exe --log-level=error --run $env:CI_PROJECT_DIRautotestjobs_clear.py"
- if(!$?) { Exit $LASTEXITCODE }
install_block:
tags:
- block_autotest
variables:
ErrorActionPreference: stop
allow_failure: false
stage: installation
script:
- Invoke-Expression -Command "$env:P7_TESTING_INSTALLATION_PATHclientp7batch.exe --log-level=error --run $env:CI_PROJECT_DIRautotestjobs_setup_block.py"
Both files _clear.py and _setup_block.py not exists, and I see the proper exception in log:
@ [Terminal] raise IOError("No such file: '{}'".format(filepath))
@ [Terminal] IOError: No such file: 'D:Logos_block_gitlab_runnerGitLab-RunnerbuildsvDLVWCgmHaerologos_userblockautotestjobs_clear.py'
[32;1m$ if(!$?) { Exit $LASTEXITCODE }[0;m
section_end:1719260050:step_script
[0K[32;1mJob succeeded[0;m
But I still receive ‘job succeeded’!!!
I have added ErrorActionPreference: stop as well as allow_failure: false but still I receive success on python exception…