Skip to content
Snippets Groups Projects
Commit 54e9c0b9 authored by nrbffs's avatar nrbffs
Browse files

CI: set GLUON_BRANCH depending on build type

Introduce the following build type:
| Build Type | When   |
|------------|--------|
| stable     | commit tag starts with "stable/" |
| beta       | commit tag starts with "beta/" |
| nightly    | trigger is a scheduled job |
| commit     | else |

Depending on the build type, set the GLUON_BRANCH accordingly:

| Build Type | GLUON_BRANCH  |
|------------|---------------|
| commit     | (unset)       |
| nightly    | nightly       |
| beta       | beta          |
| stable     | stable        |
parent eb1398ec
Branches nrbffs/ci-cache-only-dl
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ stages:
stage: build
script:
- make -C gluon update GLUON_SITEDIR="$CI_PROJECT_DIR"
- make -C gluon GLUON_SITEDIR="$CI_PROJECT_DIR" GLUON_TARGET="$GLUON_TARGET" GLUON_BRANCH=nightly V=1 -j`nproc`
- make -C gluon GLUON_SITEDIR="$CI_PROJECT_DIR" GLUON_TARGET="$GLUON_TARGET" GLUON_BRANCH=$(./get-gluon-branch.sh) V=1 -j`nproc`
artifacts:
paths:
- gluon/output/
......@@ -132,8 +132,9 @@ target:x86-64:
package:
stage: package
script:
- make -C gluon update GLUON_SITEDIR="$CI_PROJECT_DIR"
- make -C gluon manifest GLUON_BRANCH=nightly GLUON_SITEDIR="$CI_PROJECT_DIR" V=1
- GLUON_BRANCH=$(./get-gluon-branch.sh)
- test -z "$GLUON_BRANCH" || make -C gluon update GLUON_SITEDIR="$CI_PROJECT_DIR"
- test -z "$GLUON_BRANCH" || make -C gluon manifest GLUON_BRANCH=$(./get-gluon-branch.sh) GLUON_SITEDIR="$CI_PROJECT_DIR" V=1
artifacts:
paths:
- gluon/output
......
#!/bin/bash
set -eu
set -o pipefail
# autoupdater
# ====
#
# For commit builds, the autoupdater shall be off, i.e. GLUON_BRANCH unset.
# For nightly, GLUON_BRANCH must be nightly.
# For beta, GLUON_BRANCH must be beta.
# For stable, GLUON_BRANCH must be stable.
gluon_branch=""
if [[ "${CI_PIPELINE_SOURCE:-}" = "schedule" ]]; then
gluon_branch="nightly"
fi
case "${CI_COMMIT_TAG:-}" in
beta/*)
gluon_branch="beta"
;;
stable/*)
gluon_branch="stable"
;;
esac
# Else: Commit build
echo $gluon_branch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment