summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson, Craig (ca846m) <craig.anderson@att.com>2018-09-17 16:12:15 -0700
committerAnderson, Craig (ca846m) <craig.anderson@att.com>2018-09-17 22:45:55 -0700
commit73880a9973a3e6608287e5fc290529ce0ca76c84 (patch)
tree8a376799e314f73bcb9f767a2b22165b0979d1b7
parent0927b6a61cf1c1573dec39f207c30811b6c128bf (diff)
fix divingbell gate scripts
Notes
Notes (review): Code-Review+2: Felipe Monteiro <felipe.monteiro@att.com> Code-Review+1: Chris Wedgwood <cw@f00f.org> Code-Review+2: Alan Meadows <alan.meadows@gmail.com> Workflow+1: Alan Meadows <alan.meadows@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 19 Sep 2018 03:47:55 +0000 Reviewed-on: https://review.openstack.org/603246 Project: openstack/airship-divingbell Branch: refs/heads/master
-rw-r--r--.zuul.yaml1
-rwxr-xr-xdivingbell/tools/gate/setup.sh9
-rw-r--r--tools/gate/playbooks/airship-divingbell-check.yaml3
-rw-r--r--tools/gate/playbooks/osh-infra-deploy-docker.yaml4
-rwxr-xr-xtools/gate/scripts/020-test-divingbell.sh (renamed from divingbell/tools/gate/test.sh)16
5 files changed, 10 insertions, 23 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 956158d..5b45fdb 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -15,7 +15,6 @@
15 jobs: 15 jobs:
16 - airship-divingbell-linter 16 - airship-divingbell-linter
17 - airship-divingbell-ubuntu: 17 - airship-divingbell-ubuntu:
18 voting: false
19 irrelevant-files: 18 irrelevant-files:
20 - ^.*\.rst$ 19 - ^.*\.rst$
21 - ^doc/.*$ 20 - ^doc/.*$
diff --git a/divingbell/tools/gate/setup.sh b/divingbell/tools/gate/setup.sh
deleted file mode 100755
index 0f23952..0000000
--- a/divingbell/tools/gate/setup.sh
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/bash
2
3set -ex
4
5export TMP_DIR=$(mktemp -d)
6cd $TMP_DIR
7git clone https://git.openstack.org/openstack/openstack-helm
8cd openstack-helm/tools/gate/
9./setup_gate.sh
diff --git a/tools/gate/playbooks/airship-divingbell-check.yaml b/tools/gate/playbooks/airship-divingbell-check.yaml
index 89cbd90..dd92cce 100644
--- a/tools/gate/playbooks/airship-divingbell-check.yaml
+++ b/tools/gate/playbooks/airship-divingbell-check.yaml
@@ -16,7 +16,8 @@
16 tasks: 16 tasks:
17 - name: Build Charts 17 - name: Build Charts
18 shell: | 18 shell: |
19 set -xe; 19 set -e;
20 ./tools/gate/scripts/010-build-charts.sh 20 ./tools/gate/scripts/010-build-charts.sh
21 sudo ./tools/gate/scripts/020-test-divingbell.sh
21 args: 22 args:
22 chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}" 23 chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}"
diff --git a/tools/gate/playbooks/osh-infra-deploy-docker.yaml b/tools/gate/playbooks/osh-infra-deploy-docker.yaml
index 4c54324..7bf66fa 100644
--- a/tools/gate/playbooks/osh-infra-deploy-docker.yaml
+++ b/tools/gate/playbooks/osh-infra-deploy-docker.yaml
@@ -35,9 +35,9 @@
35 - setup-firewall 35 - setup-firewall
36 - deploy-python-pip 36 - deploy-python-pip
37 - deploy-docker 37 - deploy-docker
38 - deploy-yq 38 - deploy-jq
39 tags: 39 tags:
40 - setup-firewall 40 - setup-firewall
41 - deploy-python-pip 41 - deploy-python-pip
42 - deploy-docker 42 - deploy-docker
43 - deploy-yq 43 - deploy-jq
diff --git a/divingbell/tools/gate/test.sh b/tools/gate/scripts/020-test-divingbell.sh
index 876950e..22c3347 100755
--- a/divingbell/tools/gate/test.sh
+++ b/tools/gate/scripts/020-test-divingbell.sh
@@ -10,9 +10,7 @@ NAME=divingbell
10mkdir -p "${LOGS_SUBDIR}" 10mkdir -p "${LOGS_SUBDIR}"
11LOG_NAME="${LOGS_SUBDIR}/test.log" 11LOG_NAME="${LOGS_SUBDIR}/test.log"
12TEST_RESULTS="${LOGS_SUBDIR}/results.log" 12TEST_RESULTS="${LOGS_SUBDIR}/results.log"
13DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 13BASE_VALS="--values=divingbell/values.yaml"
14cd "${DIR}"
15BASE_VALS="--values=${DIR}/../../values.yaml"
16SYSCTL_KEY1=net.ipv4.conf.all.log_martians 14SYSCTL_KEY1=net.ipv4.conf.all.log_martians
17SYSCTL_VAL1_DEFAULT=1 15SYSCTL_VAL1_DEFAULT=1
18SYSCTL_KEY2=net.ipv4.conf.all.secure_redirects 16SYSCTL_KEY2=net.ipv4.conf.all.secure_redirects
@@ -46,6 +44,7 @@ USERNAME3=userthree
46USERNAME3_SUDO=true 44USERNAME3_SUDO=true
47USERNAME4=userfour 45USERNAME4=userfour
48USERNAME4_SUDO=false 46USERNAME4_SUDO=false
47type lshw || apt -y install lshw
49nic_info="$(lshw -class network)" 48nic_info="$(lshw -class network)"
50physical_nic='' 49physical_nic=''
51IFS=$'\n' 50IFS=$'\n'
@@ -118,9 +117,6 @@ _reset_account(){
118} 117}
119 118
120init_default_state(){ 119init_default_state(){
121 if [ "${1}" = 'make' ]; then
122 (cd ../../../; make)
123 fi
124 purge_containers 120 purge_containers
125 clean_persistent_files 121 clean_persistent_files
126 # set sysctl original vals 122 # set sysctl original vals
@@ -142,15 +138,15 @@ init_default_state(){
142 138
143install(){ 139install(){
144 purge_containers 140 purge_containers
145 helm install --name="${NAME}" --debug "../../../${NAME}" --namespace="${NAME}" "$@" 141 helm install --name="${NAME}" --debug "${NAME}" --namespace="${NAME}" "$@"
146} 142}
147 143
148upgrade(){ 144upgrade(){
149 helm upgrade --name="${NAME}" --debug "../../../${NAME}" --namespace="${NAME}" "$@" 145 helm upgrade --name="${NAME}" --debug "${NAME}" --namespace="${NAME}" "$@"
150} 146}
151 147
152dry_run(){ 148dry_run(){
153 helm install --name="${NAME}" --dry-run --debug "../../../${NAME}" --namespace="${NAME}" "$@" 149 helm install --name="${NAME}" --dry-run --debug "${NAME}" --namespace="${NAME}" "$@"
154} 150}
155 151
156get_container_status(){ 152get_container_status(){
@@ -976,7 +972,7 @@ test_overrides(){
976} 972}
977 973
978# initialization 974# initialization
979init_default_state make 975init_default_state
980 976
981# run tests 977# run tests
982install_base 978install_base