summaryrefslogtreecommitdiff
path: root/.gitlab/generate_job_metadata
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2023-01-13 10:01:52 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-16 20:51:26 -0500
commiteeea59bb3df6977ead66bf0b24976b03a6021f51 (patch)
tree99da1e78a6be2da002b64660978c99be32089434 /.gitlab/generate_job_metadata
parent28cb2ed00cf261720a8db907f6ceb04266924ab7 (diff)
downloadhaskell-eeea59bb3df6977ead66bf0b24976b03a6021f51.tar.gz
Add scripts to generate ghcup metadata on nightly and release pipelines
1. A python script in .gitlab/rel_eng/mk-ghcup-metadata which generates suitable metadata for consumption by GHCUp for the relevant pipelines. - The script generates the metadata just as the ghcup maintainers want, without taking into account platform/library combinations. It is updated manually when the mapping changes. - The script downloads the bindists which ghcup wants to distribute, calculates the hash and generates the yaml in the correct structure. - The script is documented in the .gitlab/rel_eng/mk-ghcup-metadata/README.mk file 1a. The script requires us to understand the mapping from platform -> job. To choose the preferred bindist for each platform the .gitlab/gen_ci.hs script is modified to allow outputting a metadata file which answers the question about which job produces the bindist which we want to distribute to users for a specific platform. 2. Pipelines to run on nightly and release jobs to generate metadata - ghcup-metadata-nightly: Generates metadata which points directly to artifacts in the nightly job. - ghcup-metadata-release: Generates metadata suitable for inclusion directly in ghcup by pointing to the downloads folder where the bindist will be uploaded to. 2a. Trigger jobs which test the generated metadata in the downstream `ghccup-ci` repo. See that repo for documentation about what is tested and how but essentially we test in a variety of clean images that ghcup can download and install the bindists we say exist in our metadata.
Diffstat (limited to '.gitlab/generate_job_metadata')
-rwxr-xr-x.gitlab/generate_job_metadata5
1 files changed, 5 insertions, 0 deletions
diff --git a/.gitlab/generate_job_metadata b/.gitlab/generate_job_metadata
new file mode 100755
index 0000000000..017f578f51
--- /dev/null
+++ b/.gitlab/generate_job_metadata
@@ -0,0 +1,5 @@
+#! /usr/bin/env nix-shell
+#!nix-shell -i bash -p cabal-install "haskell.packages.ghc924.ghcWithPackages (pkgs: with pkgs; [aeson])" git jq
+
+cd "$(dirname "${BASH_SOURCE[0]}")"
+cabal run gen_ci -- metadata jobs-metadata.json