Skip to contentSkip to conversation

gitlab-ci: Always upload artifacts by default

PATCH In review Philippe Mathieu-Daudé 1 participant 2 messages Dec 29, 2021 – Dec 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitlab-ci: Always upload artifacts by default

GitLab defaults [1] to upload artifacts only when the job succeeds, which is not helpful to troubleshoot failing tests. Switch to always upload artifacts by default for QEMU jobs, by setting the 'artifacts:when' keyword in the global default section [2].

[1] https://docs.gitlab.com/ee/ci/yaml/index.html#artifactswhen
[2] https://docs.gitlab.com/ee/ci/yaml/index.html#default

---
 .gitlab-ci.d/qemu-project.yml | 4 ++++
 1 file changed, 4 insertions(+)
.gitlab-ci.d/qemu-project.yml +4 -0
index 871262fe0e8..24137c14dc4 100644
@@ -1,6 +1,10 @@
 # This file contains the set of jobs run by the QEMU project:
 # https://gitlab.com/qemu-project/qemu/-/pipelines
 
+default:
+  artifacts:
+    when: always
+
 include:
   - local: '/.gitlab-ci.d/stages.yml'
   - local: '/.gitlab-ci.d/edk2.yml'
Signature · 1 line
2.33.1
#1 lore raw
Quoted 19 lines · Philippe Mathieu-Daudé

GitLab defaults [1] to upload artifacts only when the job succeeds, which is not helpful to troubleshoot failing tests. Switch to always upload artifacts by default for QEMU jobs, by setting the 'artifacts:when' keyword in the global default section [2].

[1] https://docs.gitlab.com/ee/ci/yaml/index.html#artifactswhen
[2] https://docs.gitlab.com/ee/ci/yaml/index.html#default

---
 .gitlab-ci.d/qemu-project.yml | 4 ++++
 1 file changed, 4 insertions(+)
.gitlab-ci.d/qemu-project.yml +0 -0
index 871262fe0e8..24137c14dc4 100644

.gitlab-ci.d/qemu-project.yml line 6

Quoted 6 lines
.gitlab-ci.d/qemu-project.yml +3 -0
@@ -1,6 +1,10 @@
 # This file contains the set of jobs run by the QEMU project:
 # https://gitlab.com/qemu-project/qemu/-/pipelines
 
+default:
+  artifacts:
+    when: always

Hmm this doesn't work as expected... Please disregard this patch.