Make $TRIPLEO_ROOT overrideable
Being able to set a different $TRIPLEO_ROOT other than /opt/stack/new makes the toci scripts more useful when running locally. There are also lots of places where /opt/stack/new was used directly, when we could/should be using $TRIPLEO_ROOT. Change-Id: Iac212866fc343f3f3f930fad57b3a52236513d34
This commit is contained in:
parent
5529912854
commit
1bd0b32e2a
|
@ -7,12 +7,12 @@
|
|||
# that triggers ci).
|
||||
function temprevert(){
|
||||
# Before reverting check to ensure this isn't the related fix
|
||||
if git --git-dir=/opt/stack/new/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then
|
||||
if git --git-dir=$TRIPLEO_ROOT/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then
|
||||
echo "Skipping temprevert because bug fix $3 was found in git message."
|
||||
return 0
|
||||
fi
|
||||
|
||||
pushd /opt/stack/new/$1
|
||||
pushd $TRIPLEO_ROOT/$1
|
||||
# Abort on fail so we're not left in a conflict state
|
||||
git revert --no-edit $2 || git revert --abort || true
|
||||
popd
|
||||
|
@ -25,12 +25,12 @@ function temprevert(){
|
|||
# that triggers ci).
|
||||
function pin(){
|
||||
# Before reverting check to ensure this isn't the related fix
|
||||
if git --git-dir=/opt/stack/new/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then
|
||||
if git --git-dir=$TRIPLEO_ROOT/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then
|
||||
echo "Skipping pin because bug fix $3 was found in git message."
|
||||
return 0
|
||||
fi
|
||||
|
||||
pushd /opt/stack/new/$1
|
||||
pushd $TRIPLEO_ROOT/$1
|
||||
git reset --hard $2
|
||||
popd
|
||||
}
|
||||
|
@ -45,12 +45,12 @@ function cherrypick(){
|
|||
local REFSPEC=$2
|
||||
|
||||
# Before cherrypicking check to ensure this isn't the related fix
|
||||
if git --git-dir=/opt/stack/new/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then
|
||||
if git --git-dir=$TRIPLEO_ROOT/${ZUUL_PROJECT#*/}/.git log -1 | grep -iE "bug.*$3" ; then
|
||||
echo "Skipping cherrypick because bug fix $3 was found in git message."
|
||||
return 0
|
||||
fi
|
||||
|
||||
pushd /opt/stack/new/$PROJ_NAME
|
||||
pushd $TRIPLEO_ROOT/$PROJ_NAME
|
||||
git fetch https://review.openstack.org/openstack/$PROJ_NAME "$REFSPEC"
|
||||
# Abort on fail so we're not left in a conflict state
|
||||
git cherry-pick FETCH_HEAD || git cherry-pick --abort
|
||||
|
@ -178,7 +178,7 @@ function postci(){
|
|||
fi
|
||||
if [ "${SEED_IP:-}" != "" ] ; then
|
||||
# Generate extra state information from the running undercloud
|
||||
ssh root@${SEED_IP} /opt/stack/new/tripleo-ci/scripts/get_host_info.sh
|
||||
ssh root@${SEED_IP} $TRIPLEO_ROOT/tripleo-ci/scripts/get_host_info.sh
|
||||
|
||||
# Get logs from the undercloud
|
||||
ssh root@${SEED_IP} $TARCMD > $WORKSPACE/logs/undercloud.tar.xz
|
||||
|
@ -216,12 +216,12 @@ function postci(){
|
|||
fi
|
||||
elif [ "$OSINFRA" = "1" ] ; then
|
||||
local i=2
|
||||
sudo /opt/stack/new/tripleo-ci/scripts/get_host_info.sh
|
||||
sudo $TRIPLEO_ROOT/tripleo-ci/scripts/get_host_info.sh
|
||||
$TARCMD > $WORKSPACE/logs/primary_node.tar.xz
|
||||
for ip in $(cat /etc/nodepool/sub_nodes_private); do
|
||||
mkdir $WORKSPACE/logs/subnode-$i/
|
||||
ssh $SSH_OPTIONS -i /etc/nodepool/id_rsa $ip \
|
||||
sudo /opt/stack/new/tripleo-ci/scripts/get_host_info.sh
|
||||
sudo $TRIPLEO_ROOT/tripleo-ci/scripts/get_host_info.sh
|
||||
ssh $SSH_OPTIONS -i /etc/nodepool/id_rsa $ip \
|
||||
$TARCMD > $WORKSPACE/logs/subnode-$i/subnode-$i.tar.xz
|
||||
# These files are causing the publish logs ansible
|
||||
|
|
|
@ -12,7 +12,7 @@ if [[ $OVERRIDE_ZUUL_BRANCH =~ ^stable/ ]]; then
|
|||
export STABLE_RELEASE=${OVERRIDE_ZUUL_BRANCH#stable/}
|
||||
fi
|
||||
|
||||
export TRIPLEO_ROOT=/opt/stack/new
|
||||
export TRIPLEO_ROOT=${TRIPLEO_ROOT:-"/opt/stack/new"}
|
||||
export PATH=/sbin:/usr/sbin:$PATH
|
||||
|
||||
export UNDERCLOUD_VM_NAME=instack
|
||||
|
|
|
@ -4,8 +4,8 @@ set -o pipefail
|
|||
cd
|
||||
|
||||
# This sets all the environment variables for undercloud and overcloud installation
|
||||
source /opt/stack/new/tripleo-ci/deploy.env
|
||||
source /opt/stack/new/tripleo-ci/scripts/metrics.bash
|
||||
source $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
source $TRIPLEO_ROOT/tripleo-ci/scripts/metrics.bash
|
||||
|
||||
# Prevent python from buffering stdout, so timestamps are set at appropriate times
|
||||
export PYTHONUNBUFFERED=true
|
||||
|
@ -29,7 +29,7 @@ fi
|
|||
sudo mkdir -p /etc/puppet/hieradata
|
||||
|
||||
if [ "$OSINFRA" = 1 ]; then
|
||||
echo 'net_config_override = /opt/stack/new/tripleo-ci/undercloud-configs/net-config-multinode.json.template' >> ~/undercloud.conf
|
||||
echo "net_config_override = $TRIPLEO_ROOT/tripleo-ci/undercloud-configs/net-config-multinode.json.template" >> ~/undercloud.conf
|
||||
fi
|
||||
|
||||
echo "INFO: Check /var/log/undercloud_install.txt for undercloud install output"
|
||||
|
|
|
@ -34,7 +34,7 @@ if [ -e ~/stackrc ] ; then
|
|||
heat event-list overcloud
|
||||
# --nested-depth 2 seems to get us a reasonable list of resources without
|
||||
# taking an excessive amount of time
|
||||
openstack stack event list --nested-depth 2 -f json overcloud | /opt/stack/new/tripleo-ci/scripts/heat-deploy-times.py | tee /var/log/heat-deploy-times.log || echo 'Failed to process resource deployment times. This is expected for stable/liberty.'
|
||||
openstack stack event list --nested-depth 2 -f json overcloud | $TRIPLEO_ROOT/tripleo-ci/scripts/heat-deploy-times.py | tee /var/log/heat-deploy-times.log || echo 'Failed to process resource deployment times. This is expected for stable/liberty.'
|
||||
# useful to see what failed when puppet fails
|
||||
for failed_deployment in $(heat resource-list --nested-depth 5 overcloud | grep FAILED | grep 'StructuredDeployment ' | cut -d '|' -f3); do heat deployment-show $failed_deployment; done;
|
||||
fi
|
||||
|
|
|
@ -4,6 +4,7 @@ set -eux
|
|||
# NOTE(pabelanger): We have access to AFS mirrors, lets use them.
|
||||
source /etc/nodepool/provider
|
||||
|
||||
source $(dirname $0)/scripts/common_vars.bash
|
||||
NODEPOOL_MIRROR_HOST=${NODEPOOL_MIRROR_HOST:-mirror.$NODEPOOL_REGION.$NODEPOOL_CLOUD.openstack.org}
|
||||
NODEPOOL_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]')
|
||||
export CENTOS_MIRROR=http://$NODEPOOL_MIRROR_HOST/centos
|
||||
|
@ -14,7 +15,7 @@ export EPEL_MIRROR=http://$NODEPOOL_MIRROR_HOST/epel
|
|||
# as ci is written to use whatever zuul tells it to use, remove what zuul has given
|
||||
# us and use stable/hammer (pinned in t-p-e), N.B. This essentially invailidates
|
||||
# tripleo puppet-ceph ci
|
||||
rm -rf /opt/stack/new/puppet-ceph
|
||||
rm -rf $TRIPLEO_ROOT/puppet-ceph
|
||||
|
||||
if [ $NODEPOOL_CLOUD == 'tripleo-test-cloud-rh1' ]; then
|
||||
source $(dirname $0)/scripts/rh2.env
|
||||
|
@ -100,7 +101,7 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||
case $JOB_TYPE_PART in
|
||||
updates)
|
||||
NODECOUNT=3
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml --ceph-storage-scale 1 -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation-v6.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/net-multiple-nics-v6.yaml -e /opt/stack/new/tripleo-ci/test-environments/net-iso.yaml"
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml --ceph-storage-scale 1 -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation-v6.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/net-multiple-nics-v6.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/net-iso.yaml"
|
||||
OVERCLOUD_UPDATE_ARGS="-e /usr/share/openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.yaml $OVERCLOUD_DEPLOY_ARGS"
|
||||
NETISO_V6=1
|
||||
PACEMAKER=1
|
||||
|
@ -110,7 +111,7 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||
# In ci our overcloud nodes don't have access to an external netwrok
|
||||
# --ntp-server is here to make the deploy command happy, the ci env
|
||||
# is on virt so the clocks should be in sync without it.
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --control-scale 3 --ntp-server 0.centos.pool.ntp.org -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e /opt/stack/new/tripleo-ci/test-environments/network-templates/network-environment.yaml -e /opt/stack/new/tripleo-ci/test-environments/net-iso.yaml"
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --control-scale 3 --ntp-server 0.centos.pool.ntp.org -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/network-templates/network-environment.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/net-iso.yaml"
|
||||
NETISO_V4=1
|
||||
PACEMAKER=1
|
||||
;;
|
||||
|
@ -119,12 +120,12 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||
# In ci our overcloud nodes don't have access to an external netwrok
|
||||
# --ntp-server is here to make the deploy command happy, the ci env
|
||||
# is on virt so the clocks should be in sync without it.
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --control-scale 3 --ceph-storage-scale 1 --ntp-server 0.centos.pool.ntp.org -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e /opt/stack/new/tripleo-ci/test-environments/network-templates/network-environment.yaml -e /opt/stack/new/tripleo-ci/test-environments/net-iso.yaml"
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --control-scale 3 --ceph-storage-scale 1 --ntp-server 0.centos.pool.ntp.org -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/network-templates/network-environment.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/net-iso.yaml"
|
||||
NETISO_V4=1
|
||||
PACEMAKER=1
|
||||
;;
|
||||
nonha)
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /opt/stack/new/tripleo-ci/test-environments/enable-tls.yaml -e /opt/stack/new/tripleo-ci/test-environments/inject-trust-anchor.yaml --ceph-storage-scale 1 -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph-devel.yaml"
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e $TRIPLEO_ROOT/tripleo-ci/test-environments/enable-tls.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/inject-trust-anchor.yaml --ceph-storage-scale 1 -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph-devel.yaml"
|
||||
INTROSPECT=1
|
||||
NODECOUNT=3
|
||||
UNDERCLOUD_SSL=1
|
||||
|
@ -153,7 +154,7 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||
UNDERCLOUD_SSL=0
|
||||
INTROSPECT=0
|
||||
OVERCLOUD_DEPLOY_ARGS="--libvirt-type=qemu -t $OVERCLOUD_DEPLOY_TIMEOUT"
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml -e /opt/stack/new/tripleo-ci/test-environments/multinode.yaml --compute-scale 0 --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal"
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/multinode.yaml --compute-scale 0 --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal"
|
||||
;;
|
||||
undercloud)
|
||||
TOCIRUNNER="./toci_instack_osinfra.sh"
|
||||
|
@ -205,7 +206,7 @@ sudo yum install -y moreutils
|
|||
# Temporary fix for https://bugs.launchpad.net/tripleo/+bug/1606685
|
||||
sudo yum erase -y epel-release nodejs nodejs-devel nodejs-packaging || :
|
||||
|
||||
source /opt/stack/new/tripleo-ci/scripts/metrics.bash
|
||||
source $TRIPLEO_ROOT/tripleo-ci/scripts/metrics.bash
|
||||
start_metric "tripleo.testenv.wait.seconds"
|
||||
if [ -z "${TE_DATAFILE:-}" -a "$OSINFRA" = "0" ] ; then
|
||||
# NOTE(pabelanger): We need gear for testenv, but this really should be
|
||||
|
|
|
@ -9,7 +9,6 @@ if [ ! -e "$TE_DATAFILE" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
export TRIPLEO_ROOT=/opt/stack/new
|
||||
export PATH=/sbin:/usr/sbin:$PATH
|
||||
|
||||
export CURRENT_DIR=$(dirname ${BASH_SOURCE[0]:-$0})
|
||||
|
@ -155,7 +154,7 @@ ssh $SSH_OPTIONS root@${SEED_IP} <<-EOF
|
|||
|
||||
set -eux
|
||||
|
||||
source /opt/stack/new/tripleo-ci/deploy.env
|
||||
source $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
|
||||
ip route add 0.0.0.0/0 dev eth0 via $MY_IP
|
||||
|
||||
|
|
Loading…
Reference in New Issue