jenkins-common.sh: add image_suffix_is_master()
Since recently, we also have a new IMAGE_SUFFIX '2021q1-centos8'. We cannot rely on image_suffix_is_latest() anymore, because this prefix does not qualify as 'latest'. If one needs to enable a feature that is only available in master, then here is a way: if ! image_suffix_is_master; then # Patch the configuration files fi Change-Id: I65df66cd2e14934bed8114618d6ffad7831d1025
This commit is contained in:
parent
12c37168ed
commit
0e9d8d75a2
|
@ -343,6 +343,14 @@ image_suffix_is_latest() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check if IMAGE_SUFFIX starts with "master" (e.g. "master-centos8")
|
||||||
|
image_suffix_is_master() {
|
||||||
|
case "$IMAGE_SUFFIX" in
|
||||||
|
master*) return 0 ;;
|
||||||
|
*) return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# non-jenkins execution: assume local user name
|
# non-jenkins execution: assume local user name
|
||||||
|
|
Loading…
Reference in New Issue