[Git][ghc/ghc][master] ci: Fix variable inheritence for ghcup-metadata testing job

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Sep 27 10:13:18 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00
ci: Fix variable inheritence for ghcup-metadata testing job

Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine
how to setup all the different jobs.

On the downstream trigger this was being inherited from the default
setting in .gitlab.yml file.

Therefore this led to job failures as the necessary CONFIGURE_ARGS were
not being passed to the configure script when installing the bindist.

See docs:

* https://docs.gitlab.com/ee/ci/yaml/#inherit
* https://docs.gitlab.com/ee/ci/yaml/#triggerforward

1. inherit:variables:fals
  - This stops the global variables being inherited into the job and
    hence forwarded onto the downstream job.

2. trigger:forward:*
  - yaml_variables: true (default) pass yaml variables to downstream,
    this is important to pass the upstream pipeline id to downstream.
  - pipeline_variables: false (default) but don't pass pipeline
    variables (normal environment variables).

Fixes #25294

- - - - -


1 changed file:

- .gitlab-ci.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -1231,10 +1231,17 @@ ghcup-metadata-release:
     UPSTREAM_PROJECT_ID: "$CI_PROJECT_ID"
     UPSTREAM_PIPELINE_ID: "$CI_PIPELINE_ID"
     RELEASE_JOB: "$RELEASE_JOB"
+  # Do not inherit global variables (such as CONFIGURE_ARGS) as these take
+  # precedence over the variables defined in the downstream job.
+  inherit:
+    variables: false
   trigger:
     project: "ghc/ghcup-ci"
     branch: "upstream-testing"
     strategy: "depend"
+    forward:
+        yaml_variables: true
+        pipeline_variables: false
 
 ghcup-metadata-testing-nightly:
   needs:



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7cb7172eff9e18ed1c98f65a98018f76c4fcc9f6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7cb7172eff9e18ed1c98f65a98018f76c4fcc9f6
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240927/25759e25/attachment-0001.html>


More information about the ghc-commits mailing list