/
common_vars.bash.j2
80 lines (72 loc) · 4.15 KB
/
common_vars.bash.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Periodic stable jobs set OVERRIDE_ZUUL_BRANCH, gate stable jobs
# just have the branch they're proposed to, e.g ZUUL_BRANCH, in both
# cases we need to set STABLE_RELEASE to match for tripleo.sh
export ZUUL_BRANCH=${ZUUL_BRANCH:-""}
# For OVB repo "stable/1.0" is feature branch
if [ "$ZUUL_BRANCH" = "stable/1.0" -o "$ZUUL_BRANCH" = "stable/2.0" -a "$ZUUL_PROJECT" = "openstack/openstack-virtual-baremetal" ]; then
export ZUUL_BRANCH="master"
fi
# For puppet-pacemaker "stable/1.1.x" is a centos7 support branch
if [ "$ZUUL_BRANCH" = "stable/1.1.x" -a "$ZUUL_PROJECT" = "openstack/puppet-pacemaker" ]; then
export ZUUL_BRANCH="stable/train"
export STABLE_RELEASE="train"
fi
# For Ansible collection repo "stable/1.0.0" is a feature branch
if [ "$ZUUL_BRANCH" = "stable/1.0.0" -a "$ZUUL_PROJECT" = "openstack/ansible-collections-openstack" ]; then
export ZUUL_BRANCH="master"
fi
# For validations-libs repo "stable/1.6" is a support branch
if [ "$ZUUL_BRANCH" = "stable/1.6" -a "$ZUUL_PROJECT" = "openstack/validations-libs" ]; then
export ZUUL_BRANCH="stable/train"
export STABLE_RELEASE="train"
fi
# For validations-common repo "stable/1.6" is a support branch
if [ "$ZUUL_BRANCH" = "stable/1.6" -a "$ZUUL_PROJECT" = "openstack/validations-common" ]; then
export ZUUL_BRANCH="stable/train"
export STABLE_RELEASE="train"
fi
export OVERRIDE_ZUUL_BRANCH=${OVERRIDE_ZUUL_BRANCH:-""}
export STABLE_RELEASE=${STABLE_RELEASE:-""}
export FEATURE_BRANCH=${FEATURE_BRANCH:-""}
# In upgrade jobs STABLE_RELEASE is changed to point to the initial
# deployment branch but we need to keep the actual release for the review
# to be used in delorean-build phase.
export REVIEW_RELEASE=${REVIEW_RELEASE:-""}
if [[ -z $STABLE_RELEASE ]]; then
if [[ $ZUUL_BRANCH =~ ^stable/ ]]; then
export STABLE_RELEASE=${ZUUL_BRANCH#stable/}
export REVIEW_RELEASE=${ZUUL_BRANCH#stable/}
export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE}
export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE}
fi
if [[ $OVERRIDE_ZUUL_BRANCH =~ ^stable/ ]]; then
export STABLE_RELEASE=${OVERRIDE_ZUUL_BRANCH#stable/}
export REVIEW_RELEASE=${OVERRIDE_ZUUL_BRANCH#stable/}
export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE}
export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE}
fi
if [[ $OVERRIDE_ZUUL_BRANCH == stable/rhos* ]]; then
export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/{{ release|default("master") }}
export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/{{ release|default("master") }}
fi
if [[ $OVERRIDE_ZUUL_BRANCH =~ ^cloudsig/ ]]; then
export STABLE_RELEASE=${OVERRIDE_ZUUL_BRANCH}
export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE#cloudsig/}
export PIP_CONSTRAINT=https://releases.openstack.org/constraints/upper/${STABLE_RELEASE#cloudsig/}
fi
fi
# if we still don't have an stable branch, check if that
# is a feature branch
if [ -z "$STABLE_RELEASE" ] && [ "$ZUUL_BRANCH" != "master" ]; then
export FEATURE_BRANCH=$ZUUL_BRANCH
fi
export TRIPLEO_ROOT=${TRIPLEO_ROOT:-"/opt/stack/new"}
export WORKSPACE=${WORKSPACE:-"$TRIPLEO_ROOT/workspace"}
export PATH=/sbin:/usr/sbin:$PATH
export UNDERCLOUD_VM_NAME=instack
export NODEPOOL_DOCKER_REGISTRY_V2_PROXY=${NODEPOOL_DOCKER_REGISTRY_V2_PROXY:-""}
# post ci chores to run at the end of ci
SSH_OPTIONS='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Verbose -o PasswordAuthentication=no -o ConnectionAttempts=32'
# NOTE(pabelanger): this logic should be inverted to only include what developers need, not exclude things on the filesystem.
TARCMD="sudo XZ_OPT=-3 tar -cJf - --exclude=var/log/journal --exclude=udev/hwdb.bin --exclude=etc/puppet/modules --exclude=etc/project-config --exclude=etc/services --exclude=selinux/targeted --exclude=etc/services --exclude=etc/pki /var/log /etc"
JLOGCMD="sudo journalctl --output short-precise | sudo dd of=/var/log/journal-text.txt"