Don't cd to /tmp in environment-setup.sh

This script is used by developers to activate the kayobe virtual
environment and source the configuration's kayobe-env file. A cd to /tmp
is an unexpected outcome of running the script.

To test the location-independent installation, remove the chdir from the
zuul job tasks that execute kayobe commands.

Change-Id: I59194952901fa648382489f48dc7aafb03d3a682
Story: 2004252
Task: 29347
This commit is contained in:
Mark Goddard 2019-02-05 15:16:14 +00:00
parent 29c0ad98c0
commit d7ae9f2df1
5 changed files with 6 additions and 12 deletions

View File

@ -158,10 +158,6 @@ function environment_setup {
# the rocky release.
if [ ! -d "${KAYOBE_VENV_PATH}/share/kayobe/ansible" ]; then
cd "${KAYOBE_SOURCE_PATH}"
else
# kayobe should still be able to function when the current working directory
# is not the source checkout
cd /tmp
fi
}

View File

@ -10,8 +10,7 @@
tasks:
- name: Ensure overcloud is deployed
shell:
cmd: dev/overcloud-deploy.sh > {{ logs_dir }}/ansible/overcloud-deploy
chdir: "{{ kayobe_src_dir }}"
cmd: "{{ kayobe_src_dir }}/dev/overcloud-deploy.sh > {{ logs_dir }}/ansible/overcloud-deploy"
- name: Ensure test Tenks cluster is deployed
shell:

View File

@ -83,8 +83,7 @@
- name: Ensure overcloud is upgraded
shell:
cmd: dev/overcloud-upgrade.sh > {{ logs_dir }}/ansible/overcloud-upgrade
chdir: "{{ kayobe_src_dir }}"
cmd: "{{ kayobe_src_dir }}/dev/overcloud-upgrade.sh > {{ logs_dir }}/ansible/overcloud-upgrade"
# FIXME(mgoddard): The nova-compute service does not seem to be correctly
# handling the SIGHUP after being upgraded, leading to "In shutdown, no new
@ -108,3 +107,4 @@
environment:
KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}"
KAYOBE_SOURCE_PATH: "{{ kayobe_src_dir }}"

View File

@ -11,5 +11,4 @@
tasks:
- name: Ensure seed is deployed
shell:
cmd: dev/seed-deploy.sh > {{ logs_dir }}/ansible/seed-deploy
chdir: "{{ kayobe_src_dir }}"
cmd: "{{ kayobe_src_dir }}/dev/seed-deploy.sh > {{ logs_dir }}/ansible/seed-deploy"

View File

@ -56,9 +56,9 @@
- name: Ensure seed is upgraded
shell:
cmd: dev/seed-upgrade.sh > {{ logs_dir }}/ansible/seed-upgrade
chdir: "{{ kayobe_src_dir }}"
cmd: "{{ kayobe_src_dir }}/dev/seed-upgrade.sh > {{ logs_dir }}/ansible/seed-upgrade"
# TODO(mgoddard): Perform a smoke test against the upgraded current release.
environment:
KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}"
KAYOBE_SOURCE_PATH: "{{ kayobe_src_dir }}"