Skip to content
Snippets Groups Projects

gitlab-ci: Parametrize the osname and handle authenticated access

Merged Emanuele Aina requested to merge wip/em/parametrize-and-auth into main
+ 15
7
variables:
osname: apertis
release: v2021
STABLE_BRANCHES: v2019 v2020 v2021
DEV_BRANCHES: v2022dev2 v2022dev3 v2022pre v2023dev0
.render:
image: registry.gitlab.apertis.org/infrastructure/apertis-docker-images/v2022dev0-testcases-builder
image: ${CI_REGISTRY}/infrastructure/${osname}-docker-images/${release}-testcases-builder
stage: deploy
tags:
- lightweight
script:
- mkdir public
- STABLE_BRANCHES="v2019 v2020 v2021"
- DEV_BRANCHES="v2022dev2 v2022dev3 v2022pre v2023dev0"
- for BRANCH in $STABLE_BRANCHES $DEV_BRANCHES; do
- echo "Retrieving archive for $BRANCH"
- curl --fail --location --output $BRANCH.zip "https://gitlab.apertis.org/tests/apertis-test-cases/-/jobs/artifacts/apertis/$BRANCH/download?job=render-pages" && unzip -d public $BRANCH.zip || true
- done
- |
set -x
for BRANCH in $STABLE_BRANCHES $DEV_BRANCHES; do
echo "Retrieving archive for $BRANCH"
URL=$CI_API_V4_URL/projects/tests%2Fapertis-test-cases/jobs/artifacts/${osname}%2F${BRANCH}/download?job=render-pages
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --fail --location --output $BRANCH.zip "$URL" && unzip -d public $BRANCH.zip || true
done
set +x
- cp static/* public/
- ./atc_menu -o ./public/ public/
- ln -s $BRANCH public/latest
Loading