diff mbox series

[1/2] !fixup gitlab: add special rule for the hexagon container

Message ID 20210525132418.4133235-2-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series Fix for the 'testing, gdbstub and plugin updates' pull request | expand

Commit Message

Philippe Mathieu-Daudé May 25, 2021, 1:24 p.m. UTC
Make the build-user-hexagon -> hexagon-cross-container optional
to avoid on mainstream CI [*]:

 'build-user-hexagon' job needs 'hexagon-cross-container' job
  but it was not added to the pipeline

[*] https://gitlab.com/qemu-project/qemu/-/pipelines/309137207

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 .gitlab-ci.d/containers.yml | 7 ++++---
 .gitlab-ci.yml              | 8 +++++---
 2 files changed, 9 insertions(+), 6 deletions(-)

Comments

Willian Rampazzo May 26, 2021, 4:20 p.m. UTC | #1
On Tue, May 25, 2021 at 10:24 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Make the build-user-hexagon -> hexagon-cross-container optional
> to avoid on mainstream CI [*]:
>
>  'build-user-hexagon' job needs 'hexagon-cross-container' job
>   but it was not added to the pipeline
>
> [*] https://gitlab.com/qemu-project/qemu/-/pipelines/309137207
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  .gitlab-ci.d/containers.yml | 7 ++++---
>  .gitlab-ci.yml              | 8 +++++---
>  2 files changed, 9 insertions(+), 6 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
diff mbox series

Patch

diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml
index 088c7e68c3b..59803453d50 100644
--- a/.gitlab-ci.d/containers.yml
+++ b/.gitlab-ci.d/containers.yml
@@ -106,9 +106,6 @@  armhf-debian-cross-container:
 hexagon-cross-container:
   image: docker:stable
   stage: containers
-  except:
-    variables:
-      - $CI_PROJECT_NAMESPACE == 'qemu-project'
   variables:
     NAME: debian-hexagon-cross
     GIT_DEPTH: 1
@@ -127,6 +124,10 @@  hexagon-cross-container:
     - docker push "$TAG"
   after_script:
     - docker logout
+  rules:
+    - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
+      when: never
+    - when: on_success
 
 hppa-debian-cross-container:
   extends: .container_job_template
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b2f929c758b..2b89143f81f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -417,12 +417,14 @@  build-user-static:
     MAKE_CHECK_ARGS: check-tcg
 
 # Because the hexagon cross-compiler takes so long to build we don't rely
-# on the CI system to build it and hence this job has no dependency
-# declared. The image is manually uploaded.
+# on the CI system to build it. The image is manually uploaded.
 build-user-hexagon:
   extends: .native_build_job_template
   needs:
-    job: hexagon-cross-container
+    - job: hexagon-cross-container
+      # Only forks have the hexagon-cross-container job,
+      # keep it optional for mainstream.
+      optional: true
   variables:
     IMAGE: debian-hexagon-cross
     TARGETS: hexagon-linux-user