I am doing my first CI project and I have recently got confused about artefacts…
Say I have config with next jobs:
cleanup_build:
tags:
- block_autotest
stage: cleanup
script:
- Powershell $env:P7_TESTING_INSTALLATION_PATHclientp7batch.exe --log-level=error --run $env:JOBS_FOLDER_PATHclear.py
install_block:
tags:
- block_autotest
stage: installation
script:
- Powershell $env:P7_TESTING_INSTALLATION_PATHclientp7batch.exe --log-level=error --run $env:JOBS_FOLDER_PATHsetup_block.py
“install_block” job is not to be done if the job “cleanup_build” has failed. So, I have to create some kind of artifact after “cleanup_build” has succeeded so this artefact is visible at the stage “installation” for the job “install_block”. At the job “install_block” I could use python to address the artifact and ensure the one exists.
Also I have created a speciad folder for artifacts:
ARTEFACTS_FOLDER_PATH: $CI_PROJECT_DIRautotestartefacts
So within the job “cleanup_build” I create a file “clean” at the artefact folder. But it seems that CI reloads repository at project directory, because if I leave just “cleanup_build” job (delete “install_block” from yml) I can see the “clean” file at the project, but if I leave both jobs this file dissapears before “install_block” job begins…