Skip to contentSkip to conversation

gitlab-ci: Mark manual-only jobs as allow_failure

PATCH Applied Peter Maydell 4 participants 5 messages Sep 15, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitlab-ci: Mark manual-only jobs as allow_failure

If a gitlab CI job is marked as manual-only but is not marked as allow_failure, then gitlab considers that the pipeline is "blocked" until the job has been manually triggered. We need to mark these manual-only jobs as also allow_failure: true so that gitlab doesn't insist that they have run before it will consider the pipeline to be complete.

Fixes 4c9af1ea1457782cf0adb29
---
 .gitlab-ci.d/custom-runners.yml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
.gitlab-ci.d/custom-runners.yml +16 -0
index bcd22ca293c..a89a20da48d 100644
@@ -60,8 +60,10 @@ ubuntu-18.04-s390x-alldbg:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$S390X_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
@@ -79,8 +81,10 @@ ubuntu-18.04-s390x-clang:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$S390X_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
@@ -97,8 +101,10 @@ ubuntu-18.04-s390x-tci:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$S390X_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
@@ -114,8 +120,10 @@ ubuntu-18.04-s390x-notcg:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$S390X_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
@@ -154,8 +162,10 @@ ubuntu-20.04-aarch64-all:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$AARCH64_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
@@ -189,8 +199,10 @@ ubuntu-20.04-aarch64-clang:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$AARCH64_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
@@ -207,8 +219,10 @@ ubuntu-20.04-aarch64-tci:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$AARCH64_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
@@ -224,8 +238,10 @@ ubuntu-20.04-aarch64-notcg:
  rules:
  - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
    when: manual
+   allow_failure: true
  - if: "$AARCH64_RUNNER_AVAILABLE"
    when: manual
+   allow_failure: true
  script:
  - mkdir build
  - cd build
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Peter Maydell

If a gitlab CI job is marked as manual-only but is not marked as allow_failure, then gitlab considers that the pipeline is "blocked" until the job has been manually triggered. We need to mark these manual-only jobs as also allow_failure: true so that gitlab doesn't insist that they have run before it will consider the pipeline to be complete.

Quoted 5 lines
Fixes 4c9af1ea1457782cf0adb29
---
 .gitlab-ci.d/custom-runners.yml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Acked-by on v1 1/1
#2 lore raw
In reply to Peter Maydell
Quoted 18 lines · Peter Maydell

If a gitlab CI job is marked as manual-only but is not marked as allow_failure, then gitlab considers that the pipeline is "blocked" until the job has been manually triggered. We need to mark these manual-only jobs as also allow_failure: true so that gitlab doesn't insist that they have run before it will consider the pipeline to be complete.

Fixes 4c9af1ea1457782cf0adb29
---
  .gitlab-ci.d/custom-runners.yml | 16 ++++++++++++++++
  1 file changed, 16 insertions(+)
.gitlab-ci.d/custom-runners.yml +0 -0
index bcd22ca293c..a89a20da48d 100644

.gitlab-ci.d/custom-runners.yml ubuntu-18.04-s390x-alldbg: · line 69

Quoted 10 lines
.gitlab-ci.d/custom-runners.yml +2 -0
@@ -60,8 +60,10 @@ ubuntu-18.04-s390x-alldbg:
   rules:
   - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
     when: manual
+   allow_failure: true
   - if: "$S390X_RUNNER_AVAILABLE"
     when: manual
+   allow_failure: true
   script:
   - mkdir build
   - cd build

Do we need the "allow_failure: true" on both parts, for the staging branch and for the manual rule? Or would it be enough for the manual rule? Anyway:

Reviewed-by on v1 1/1
#3 lore raw
In reply to Peter Maydell
Quoted 8 lines · Peter Maydell

If a gitlab CI job is marked as manual-only but is not marked as allow_failure, then gitlab considers that the pipeline is "blocked" until the job has been manually triggered. We need to mark these manual-only jobs as also allow_failure: true so that gitlab doesn't insist that they have run before it will consider the pipeline to be complete.

Quoted 6 lines
Fixes 4c9af1ea1457782cf0adb29
---
 .gitlab-ci.d/custom-runners.yml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
author Applied
#4 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell

If a gitlab CI job is marked as manual-only but is not marked as allow_failure, then gitlab considers that the pipeline is "blocked" until the job has been manually triggered. We need to mark these manual-only jobs as also allow_failure: true so that gitlab doesn't insist that they have run before it will consider the pipeline to be complete.

Fixes 4c9af1ea1457782cf0adb29

---

Applied to master, thanks.

-- PMM