Skip to content
Snippets Groups Projects
Commit aa9089f5 authored by Nico's avatar Nico
Browse files

Merge branch 'nrbffs/set-branch-from-ci-var' into 'master'

CI: take GLUON_BRANCH from build environment if specified

See merge request !1
parents e3a77db4 6e95ca40
No related branches found
No related tags found
1 merge request!1CI: take GLUON_BRANCH from build environment if specified
Pipeline #29 canceled
......@@ -6,25 +6,23 @@ 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=""
# This script prints the name of the autoupdater branch depending on the build
# configuration. Its output is suitable for use as the GLUON_BRANCH build
# variable of gluon.
#
# The idea is to take whatever comes in the GLUON_BRANCH build variable,
# except when this value is not one of the well-known branch names; then fall
# back to 'nightly'.
if [[ "${CI_PIPELINE_SOURCE:-}" = "schedule" ]]; then
gluon_branch="nightly"
fi
default_gluon_branch_name="nightly"
case "${CI_COMMIT_TAG:-}" in
beta/*)
gluon_branch="beta"
;;
stable/*)
gluon_branch="stable"
;;
case "${GLUON_BRANCH:-}" in
"nightly" | "beta" | "stable")
gluon_branch="$GLUON_BRANCH"
;;
*):
gluon_branch="$default_gluon_branch_name"
;;
esac
# Else: Commit build
echo $gluon_branch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment