Skip to content

Allow runner to archive cache on failure

Allison Browne requested to merge ab-persist-cache-on-failure into master

What does this MR do?

Allows the runner to archive a cache on failure when specified.

GitLab codebase MR: gitlab!41822 (merged)

Issue: gitlab#18969 (closed)

Why was this MR needed?

What's the best way to test this MR?

cd ~/gitlab/gdk_ci/

git checkout 18969-allow-optional-caching-in-failed-builds

Add the following config or any variations:

Screen_Shot_2020-10-07_at_4.12.32_PM

Runner the development runners, with minio configured:

DEBUG=true go run main.go run -c ~/gitlab/gdk_ci/gitlab-runner-config.toml

Observe the results:

description screenshot
successful job Screen_Shot_2020-10-07_at_4.12.05_PM
failing job Screen_Shot_2020-10-07_at_4.12.20_PM
mino cache Screen_Shot_2020-10-07_at_3.58.52_PM

Repeat for variations of cache:when.

What are the relevant issue numbers?

gitlab#18969 (closed)

Edited by Allison Browne

Merge request reports