I just came across the ci CI_SHARED_ENVIRONMENT variable. However, the only description I could find about what it actually is doing is this one:
Marks that the job is executed in a shared environment (something that is persisted across CI invocations like shell or ssh executor). If the environment is shared, it is set to true, otherwise it is not defined at all.
Does that actually mean, I can set that variable (trough CI variable or in gitlab-ci.yml) and this will cause my jobs to start running in the same environment as it finished last time?
I am particularly asking because I am having a need to persist a directory within
/etc, which needs to be the same as after the previous job has finished. I was able to implement a workaround, but a clean solution would be much appreciated.