Mentions légales du service

Skip to content

[ci] add ability to trigger CI pipeline for rebuilding the environment cache

E Madison Bray requested to merge ci/rebuild_cache into master

In the process of messing around with #17 I accidentally deleted the existing cache volume mounted by gitlab-runner for loading our pipelines caches.

Normally the cache is built/rebuilt by the setup stage in our pipeline, which is normally only triggered when one of the environment.yml files is changed (otherwise there is no need to rebuild the environments).

However, if the cache is deleted, there's no obvious way (that I can find) to force re-running the setup stage if the environment.yml file hasn't changed.

This change allows triggering a special "setup only" pipeline by creating an empty file called .rebuild_cache in the repository root and pushing to a ci/<whatever> branch. Once the cache is rebuilt it can be used for other jobs, even those that skip the setup stage (because the cache is shared between pipelines--that's the point of it).

I was able to confirm that this rebuilt the cache for the current version of the environment files, and that previous jobs that were failing (due to the missing cache) could run again.

Merge request reports

Loading