Merge lp:~1chb1n/ubuntu-openstack-ci/artifact-move into lp:ubuntu-openstack-ci
- artifact-move
- Merge into trunk
Proposed by
Ryan Beisner
Status: | Merged |
---|---|
Merged at revision: | 337 |
Proposed branch: | lp:~1chb1n/ubuntu-openstack-ci/artifact-move |
Merge into: | lp:ubuntu-openstack-ci |
Diff against target: |
714 lines (+272/-123) 19 files modified
.bzrignore (+1/-0) admin/822-novarc-artifactweb-credentials-distribute.sh (+29/-0) job-parts/build_amulet_smoke.sh (+13/-55) job-parts/build_amulet_test.sh (+2/-1) job-parts/build_bucket_junk_cleanup.sh (+1/-1) job-parts/build_bucket_reset_object_headers.sh (+1/-1) job-parts/build_bucket_update_indices.sh (+1/-1) job-parts/build_charm_single.sh (+2/-2) job-parts/build_maint_nodes.sh (+27/-0) job-parts/build_mojo_runner.sh (+0/-1) job-parts/build_osi.sh (+0/-1) job-parts/osci_apt_common.sh (+56/-3) job-parts/osci_gerrit_common.sh (+4/-10) job-parts/osci_job_common.sh (+16/-1) job-parts/osci_jujudevel_common.sh (+14/-4) job-parts/osci_mojo_common.sh (+0/-16) job-parts/osci_openstack_common.sh (+105/-8) job-parts/osci_osi_common.sh (+0/-16) job-parts/osci_tools_common.sh (+0/-2) |
To merge this branch: | bzr merge lp:~1chb1n/ubuntu-openstack-ci/artifact-move |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu OpenStack CI Team | Pending | ||
Review via email: mp+294675@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : | # |
- 346. By Ryan Beisner
-
Update amulet smoke runner
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #2579 lp:ubuntu-openstack-ci for 1chb1n mp294675
LINT OK: passed
- 347. By Ryan Beisner
-
Disable juju ppa switching; arrange all apt operations centrally.
- 348. By Ryan Beisner
-
Update maint_node
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #2598 lp:ubuntu-openstack-ci for 1chb1n mp294675
LINT OK: passed
- 349. By Ryan Beisner
-
Temporarily set juju root trace level logging
- 350. By Ryan Beisner
-
Undo trace log
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #2619 lp:ubuntu-openstack-ci for 1chb1n mp294675
LINT OK: passed
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2015-02-18 04:49:11 +0000 | |||
3 | +++ .bzrignore 2016-05-18 11:59:22 +0000 | |||
4 | @@ -15,3 +15,4 @@ | |||
5 | 15 | deployment/jobs/jobs-static-initial.tgz | 15 | deployment/jobs/jobs-static-initial.tgz |
6 | 16 | temp.py | 16 | temp.py |
7 | 17 | .coverage | 17 | .coverage |
8 | 18 | deployment/deploy-files/novarc-artifactcloud | ||
9 | 18 | 19 | ||
10 | === added file 'admin/822-novarc-artifactweb-credentials-distribute.sh' | |||
11 | --- admin/822-novarc-artifactweb-credentials-distribute.sh 1970-01-01 00:00:00 +0000 | |||
12 | +++ admin/822-novarc-artifactweb-credentials-distribute.sh 2016-05-18 11:59:22 +0000 | |||
13 | @@ -0,0 +1,29 @@ | |||
14 | 1 | #!/bin/bash -e | ||
15 | 2 | echo $0 | ||
16 | 3 | |||
17 | 4 | # Copy artifactcloud credentials file to all nodes | ||
18 | 5 | # Requires that you have placed credentials in the deploy-files dir | ||
19 | 6 | |||
20 | 7 | . $(dirname $0)/../env-common | ||
21 | 8 | |||
22 | 9 | f_name="novarc-artifactcloud" | ||
23 | 10 | f_dst_dir="${JENKINS_HOME}" | ||
24 | 11 | f_dst="${f_dst_dir}/${f_name}" | ||
25 | 12 | f_tmp="${U_HOME}/${f_name}" | ||
26 | 13 | f_src_dir="../deployment/deploy-files" | ||
27 | 14 | f_src="${f_src_dir}/${f_name}" | ||
28 | 15 | |||
29 | 16 | if [ ! -f "$f_src" ]; then | ||
30 | 17 | echo "Local source file ${f_src} not found." | ||
31 | 18 | pwd | ||
32 | 19 | exit 1 | ||
33 | 20 | fi | ||
34 | 21 | |||
35 | 22 | for unit in $UNITS; do | ||
36 | 23 | echo "copying ${f_src} into ${unit}" | ||
37 | 24 | juju scp $f_src ${unit}:${f_tmp} | ||
38 | 25 | echo "adjusting permissions" | ||
39 | 26 | juju ssh $unit "sudo mv $f_tmp $f_dst &&\ | ||
40 | 27 | sudo chown jenkins:jenkins ${f_dst} &&\ | ||
41 | 28 | sudo chmod 600 ${f_dst}" | ||
42 | 29 | done | ||
43 | 0 | 30 | ||
44 | === modified file 'job-parts/build_amulet_smoke.sh' | |||
45 | --- job-parts/build_amulet_smoke.sh 2016-04-05 17:47:28 +0000 | |||
46 | +++ job-parts/build_amulet_smoke.sh 2016-05-18 11:59:22 +0000 | |||
47 | @@ -4,69 +4,27 @@ | |||
48 | 4 | # Source the common functions | 4 | # Source the common functions |
49 | 5 | . ${OSCI_ROOT}/job-parts/osci_job_common.sh | 5 | . ${OSCI_ROOT}/job-parts/osci_job_common.sh |
50 | 6 | 6 | ||
51 | 7 | PREFER_CURRENT_LTS="trusty" | ||
52 | 8 | BLACKLIST_CURRENT_OS_DEV="mitaka" | ||
53 | 9 | |||
54 | 10 | f_fresh_clean_start | 7 | f_fresh_clean_start |
55 | 11 | f_check_out_universal | 8 | f_check_out_universal |
56 | 9 | f_amulet_squash_00setup | ||
57 | 10 | f_amulet_set_network_env_vars | ||
58 | 11 | f_env_no_pass | ||
59 | 12 | 12 | ||
60 | 13 | f_line "Begin amulet smoke" | 13 | f_line "Begin amulet smoke" |
61 | 14 | cd $CO_DIR | 14 | cd $CO_DIR |
85 | 15 | export AMULET_TESTS_ALL="$(find ./tests -maxdepth 1 -type f -executable -print | sort)" | 15 | if grep "\[testenv:func27-smoke\]" tox.ini; then |
86 | 16 | 16 | # Look for a func27-smoke tox target and run it as the first preference. | |
87 | 17 | # Select Preferred Test: latest trusty test combo which is enabled and executable | 17 | tox -e func27-smoke |
65 | 18 | # Exclude *git* (deploy-from-source) amulet test definitions. | ||
66 | 19 | export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep $PREFER_CURRENT_LTS | grep -v git | grep -v $BLACKLIST_CURRENT_OS_DEV | tail -n 1)" | ||
67 | 20 | |||
68 | 21 | # Select Alternate Test: first in lexical order which is enabled and executable | ||
69 | 22 | # Exclude *git* (deploy-from-source) amulet test definitions. | ||
70 | 23 | if [[ -z "$AMULET_TEST_NAME" ]]; then | ||
71 | 24 | export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | grep -v $BLACKLIST_CURRENT_OS_DEV | head -n 1)" | ||
72 | 25 | fi | ||
73 | 26 | |||
74 | 27 | # Still no test found based on preference or blacklist, just run with one. | ||
75 | 28 | # Exclude *git* (deploy-from-source) amulet test definitions. | ||
76 | 29 | if [[ -z "$AMULET_TEST_NAME" ]]; then | ||
77 | 30 | export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | head -n 1)" | ||
78 | 31 | fi | ||
79 | 32 | |||
80 | 33 | # Look for 00-setup (amulet dependencies installer) and exec if found | ||
81 | 34 | AMULET_SETUP="$(find ./tests -type f -executable -name 00-setup -print | head -n 1)" | ||
82 | 35 | if [[ ! -z "$AMULET_SETUP" ]]; then | ||
83 | 36 | echo " . Executing amulet setup: $AMULET_SETUP" | ||
84 | 37 | $AMULET_SETUP | ||
88 | 38 | else | 18 | else |
118 | 39 | echo " ! Unable to find amulet 00-setup file. Proceeding anyway." | 19 | # No func27-smoke tox target exists, run a naked amulet test as smoke. |
119 | 40 | fi | 20 | echo " ! Tox-based amulet smoke target not found, falling back to automatic test selection." |
120 | 41 | 21 | f_amulet_smoke_select_tests_fallback | |
121 | 42 | f_amulet_set_network_env_vars | 22 | f_juju_bootstrap |
122 | 43 | f_env_no_pass | 23 | f_amulet_naked_test_run |
123 | 44 | 24 | fi | |
95 | 45 | if [[ -z "$AMULET_TEST_NAME" ]]; then | ||
96 | 46 | echo " ! Unable to determine which amulet test to run from $CO_DIR/tests" | ||
97 | 47 | ls -al $CO_DIR/tests | ||
98 | 48 | exit 1 | ||
99 | 49 | fi | ||
100 | 50 | |||
101 | 51 | echo " . Available amulet tests:" | ||
102 | 52 | echo "$AMULET_TESTS_ALL" | ||
103 | 53 | echo " . Automatically selected test: $AMULET_TEST_NAME" | ||
104 | 54 | |||
105 | 55 | f_juju_bootstrap | ||
106 | 56 | |||
107 | 57 | cd $CO_DIR | ||
108 | 58 | $AMULET_TEST_NAME |& tee $WORKSPACE/amulet-smoke.txt || true | ||
109 | 59 | if [[ "${PIPESTATUS[0]}" != "0" ]]; then | ||
110 | 60 | echo " ! Amulet smoke test failed: $AMULET_TEST_NAME." | ||
111 | 61 | touch $WORKSPACE/fyi-amulet-smoke.failed | ||
112 | 62 | fi | ||
113 | 63 | |||
114 | 64 | f_line "Cleaning up deployer temp directories" | ||
115 | 65 | echo " - Removing dir: $CO_DIR" | ||
116 | 66 | cd $WORKSPACE | ||
117 | 67 | rm -rf $CO_DIR | ||
124 | 68 | f_line "End amulet smoke" | 25 | f_line "End amulet smoke" |
125 | 69 | 26 | ||
126 | 27 | f_remove_co_dir | ||
127 | 70 | f_collect_juju_logs | 28 | f_collect_juju_logs |
128 | 71 | f_set_build_descr | 29 | f_set_build_descr |
129 | 72 | f_nice_finish | 30 | f_nice_finish |
130 | 73 | 31 | ||
131 | === modified file 'job-parts/build_amulet_test.sh' | |||
132 | --- job-parts/build_amulet_test.sh 2016-02-29 19:46:17 +0000 | |||
133 | +++ job-parts/build_amulet_test.sh 2016-05-18 11:59:22 +0000 | |||
134 | @@ -5,7 +5,7 @@ | |||
135 | 5 | # Makefile command search strings, first match wins | 5 | # Makefile command search strings, first match wins |
136 | 6 | sstring[0]="@juju test" | 6 | sstring[0]="@juju test" |
137 | 7 | sstring[1]=".venv/bin/bundletester" | 7 | sstring[1]=".venv/bin/bundletester" |
139 | 8 | #sstring[2]="" | 8 | sstring[2]="@tox -e func27" |
140 | 9 | #sstring[3]="" | 9 | #sstring[3]="" |
141 | 10 | #sstring[4]="" | 10 | #sstring[4]="" |
142 | 11 | 11 | ||
143 | @@ -28,6 +28,7 @@ | |||
144 | 28 | f_line "begin amulet test" | 28 | f_line "begin amulet test" |
145 | 29 | f_juju_get_pkg_info juju-pkg-info.txt | 29 | f_juju_get_pkg_info juju-pkg-info.txt |
146 | 30 | f_run_makefile_test | 30 | f_run_makefile_test |
147 | 31 | f_get_func_results_file | ||
148 | 31 | f_line "end amulet test" | 32 | f_line "end amulet test" |
149 | 32 | 33 | ||
150 | 33 | f_collect_juju_logs | 34 | f_collect_juju_logs |
151 | 34 | 35 | ||
152 | === modified file 'job-parts/build_bucket_junk_cleanup.sh' | |||
153 | --- job-parts/build_bucket_junk_cleanup.sh 2016-04-15 03:53:13 +0000 | |||
154 | +++ job-parts/build_bucket_junk_cleanup.sh 2016-05-18 11:59:22 +0000 | |||
155 | @@ -4,7 +4,7 @@ | |||
156 | 4 | 4 | ||
157 | 5 | f_gerrit_set_blob_vars | 5 | f_gerrit_set_blob_vars |
158 | 6 | env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort | 6 | env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort |
160 | 7 | f_novarc_undercloud | 7 | f_novarc_artifactcloud |
161 | 8 | 8 | ||
162 | 9 | 9 | ||
163 | 10 | f_line "Deleting junk objects" | 10 | f_line "Deleting junk objects" |
164 | 11 | 11 | ||
165 | === modified file 'job-parts/build_bucket_reset_object_headers.sh' | |||
166 | --- job-parts/build_bucket_reset_object_headers.sh 2016-04-15 03:53:13 +0000 | |||
167 | +++ job-parts/build_bucket_reset_object_headers.sh 2016-05-18 11:59:22 +0000 | |||
168 | @@ -4,7 +4,7 @@ | |||
169 | 4 | 4 | ||
170 | 5 | f_gerrit_set_blob_vars | 5 | f_gerrit_set_blob_vars |
171 | 6 | env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort | 6 | env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort |
173 | 7 | f_novarc_undercloud | 7 | f_novarc_artifactcloud |
174 | 8 | 8 | ||
175 | 9 | f_bucket_reset_txt_html_object_headers | 9 | f_bucket_reset_txt_html_object_headers |
176 | 10 | 10 | ||
177 | 11 | 11 | ||
178 | === modified file 'job-parts/build_bucket_update_indices.sh' | |||
179 | --- job-parts/build_bucket_update_indices.sh 2016-04-15 03:53:13 +0000 | |||
180 | +++ job-parts/build_bucket_update_indices.sh 2016-05-18 11:59:22 +0000 | |||
181 | @@ -4,7 +4,7 @@ | |||
182 | 4 | 4 | ||
183 | 5 | f_gerrit_set_blob_vars | 5 | f_gerrit_set_blob_vars |
184 | 6 | env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort | 6 | env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort |
186 | 7 | f_novarc_undercloud | 7 | f_novarc_artifactcloud |
187 | 8 | 8 | ||
188 | 9 | f_bucket_create_index_of_indices | 9 | f_bucket_create_index_of_indices |
189 | 10 | f_bucket_upload_index_of_indices | 10 | f_bucket_upload_index_of_indices |
190 | 11 | 11 | ||
191 | === modified file 'job-parts/build_charm_single.sh' | |||
192 | --- job-parts/build_charm_single.sh 2016-04-22 16:23:41 +0000 | |||
193 | +++ job-parts/build_charm_single.sh 2016-05-18 11:59:22 +0000 | |||
194 | @@ -12,10 +12,10 @@ | |||
195 | 12 | # Gerrit-triggered jobs will pass GERRIT_BRANCH, while other legacy | 12 | # Gerrit-triggered jobs will pass GERRIT_BRANCH, while other legacy |
196 | 13 | # jobs will pass GIT_BRANCH. | 13 | # jobs will pass GIT_BRANCH. |
197 | 14 | if [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != *stable* ]] && [[ "$GIT_BRANCH" != *stable* ]]; then | 14 | if [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != *stable* ]] && [[ "$GIT_BRANCH" != *stable* ]]; then |
199 | 15 | # Master | 15 | # Master (dev) |
200 | 16 | export SUPPORTED_SERIES="trusty wily xenial" | 16 | export SUPPORTED_SERIES="trusty wily xenial" |
201 | 17 | elif [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != "master" ]] && [[ "$GIT_BRANCH" != "master" ]]; then | 17 | elif [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != "master" ]] && [[ "$GIT_BRANCH" != "master" ]]; then |
203 | 18 | # Stable | 18 | # Stable (released) |
204 | 19 | export SUPPORTED_SERIES="trusty wily xenial" | 19 | export SUPPORTED_SERIES="trusty wily xenial" |
205 | 20 | else | 20 | else |
206 | 21 | echo " ! Unable to determine SUPPORTED_SERIES based on GERRIT_BRANCH and/or GIT_BRANCH values" | 21 | echo " ! Unable to determine SUPPORTED_SERIES based on GERRIT_BRANCH and/or GIT_BRANCH values" |
207 | 22 | 22 | ||
208 | === added file 'job-parts/build_maint_nodes.sh' | |||
209 | --- job-parts/build_maint_nodes.sh 1970-01-01 00:00:00 +0000 | |||
210 | +++ job-parts/build_maint_nodes.sh 2016-05-18 11:59:22 +0000 | |||
211 | @@ -0,0 +1,27 @@ | |||
212 | 1 | #!/bin/bash -e | ||
213 | 2 | # Build script to perform periodic jenkins master/slave maintenance tasks | ||
214 | 3 | |||
215 | 4 | # Source the common functions | ||
216 | 5 | . ${OSCI_ROOT}/job-parts/osci_job_common.sh | ||
217 | 6 | |||
218 | 7 | # Prep environment | ||
219 | 8 | f_skip_juju_lxc | ||
220 | 9 | f_fresh_clean_start | ||
221 | 10 | f_env_no_pass | ||
222 | 11 | |||
223 | 12 | # Install/update to the latest version of mojo | ||
224 | 13 | f_mojo_install | ||
225 | 14 | |||
226 | 15 | # Install/update to the latest version of openstack-installer | ||
227 | 16 | f_osi_install | ||
228 | 17 | |||
229 | 18 | # Install/update to the latest version of git and bzr tools | ||
230 | 19 | f_vcs_tools_install | ||
231 | 20 | |||
232 | 21 | # Install update misc tools | ||
233 | 22 | f_misc_global_tools_install | ||
234 | 23 | |||
235 | 24 | # Wrap up | ||
236 | 25 | f_set_build_descr | ||
237 | 26 | f_nice_finish | ||
238 | 27 | f_check_fail | ||
239 | 0 | 28 | ||
240 | === modified file 'job-parts/build_mojo_runner.sh' | |||
241 | --- job-parts/build_mojo_runner.sh 2016-02-29 21:54:46 +0000 | |||
242 | +++ job-parts/build_mojo_runner.sh 2016-05-18 11:59:22 +0000 | |||
243 | @@ -32,7 +32,6 @@ | |||
244 | 32 | # Prep environment | 32 | # Prep environment |
245 | 33 | f_fresh_clean_start | 33 | f_fresh_clean_start |
246 | 34 | f_env_no_pass | 34 | f_env_no_pass |
247 | 35 | f_mojo_install | ||
248 | 36 | 35 | ||
249 | 37 | f_line "validating mojo runner env vars" | 36 | f_line "validating mojo runner env vars" |
250 | 38 | f_mojo_handle_env_vars | 37 | f_mojo_handle_env_vars |
251 | 39 | 38 | ||
252 | === modified file 'job-parts/build_osi.sh' | |||
253 | --- job-parts/build_osi.sh 2015-11-21 14:39:51 +0000 | |||
254 | +++ job-parts/build_osi.sh 2016-05-18 11:59:22 +0000 | |||
255 | @@ -38,7 +38,6 @@ | |||
256 | 38 | f_env_no_pass | 38 | f_env_no_pass |
257 | 39 | f_touch_try | 39 | f_touch_try |
258 | 40 | f_amulet_set_network_env_vars | 40 | f_amulet_set_network_env_vars |
259 | 41 | f_osi_install | ||
260 | 42 | 41 | ||
261 | 43 | # Go! | 42 | # Go! |
262 | 44 | f_line "Deploy via OSI (openstack-installer mode: ${OSI_MODE})" | 43 | f_line "Deploy via OSI (openstack-installer mode: ${OSI_MODE})" |
263 | 45 | 44 | ||
264 | === renamed file 'job-parts/osci_vcs_common.sh' => 'job-parts/osci_apt_common.sh' | |||
265 | --- job-parts/osci_vcs_common.sh 2016-02-24 19:45:46 +0000 | |||
266 | +++ job-parts/osci_apt_common.sh 2016-05-18 11:59:22 +0000 | |||
267 | @@ -2,13 +2,66 @@ | |||
268 | 2 | # | 2 | # |
269 | 3 | # Common functions for UOSCI vcs systems (publicly-available information only!) | 3 | # Common functions for UOSCI vcs systems (publicly-available information only!) |
270 | 4 | 4 | ||
271 | 5 | |||
272 | 5 | function f_vcs_configure() { | 6 | function f_vcs_configure() { |
276 | 6 | dpkg-query --show bzr || sudo apt-get install bzr -y | 7 | f_line "vcs configure" |
274 | 7 | dpkg-query --show git || sudo apt-get install git -y | ||
275 | 8 | dpkg-query --show git-review || sudo apt-get install git-review -y | ||
277 | 9 | bzr whoami "uoscibot <uosci-testing-bot@ubuntu.com>" | 8 | bzr whoami "uoscibot <uosci-testing-bot@ubuntu.com>" |
278 | 10 | bzr launchpad-login uosci-testing-bot | 9 | bzr launchpad-login uosci-testing-bot |
279 | 11 | git config --global user.email "uosci-testing-bot@ubuntu.com" | 10 | git config --global user.email "uosci-testing-bot@ubuntu.com" |
280 | 12 | git config --global user.name "uoscibot" | 11 | git config --global user.name "uoscibot" |
281 | 13 | git config --global gitreview.username "uosci-testing-bot" | 12 | git config --global gitreview.username "uosci-testing-bot" |
282 | 14 | } | 13 | } |
283 | 14 | |||
284 | 15 | |||
285 | 16 | function f_vcs_tools_install() { | ||
286 | 17 | # VCS packages to keep installed and updated on all master/slaves | ||
287 | 18 | f_line "vcs tools install" | ||
288 | 19 | sudo apt-get update -y &> /dev/null || true | ||
289 | 20 | sudo apt-get install bzr -y | ||
290 | 21 | sudo apt-get install git -y | ||
291 | 22 | sudo apt-get install git-review -y | ||
292 | 23 | } | ||
293 | 24 | |||
294 | 25 | |||
295 | 26 | function f_misc_global_tools_install() { | ||
296 | 27 | # Misc packages to keep installed and updated on all master/slaves | ||
297 | 28 | f_line "misc global tools install" | ||
298 | 29 | sudo apt-get update -y &> /dev/null || true | ||
299 | 30 | sudo apt-get install ipcalc -y | ||
300 | 31 | sudo apt-get install bzr-fastimport -y | ||
301 | 32 | sudo apt-get install python-virtualenv libffi-dev libssl-dev -y | ||
302 | 33 | } | ||
303 | 34 | |||
304 | 35 | |||
305 | 36 | function f_mojo_install() { | ||
306 | 37 | # Install or upgrade mojo | ||
307 | 38 | f_line "mojo install" | ||
308 | 39 | echo "Installing or upgrading mojo..." | ||
309 | 40 | sudo add-apt-repository ppa:mojo-maintainers/ppa -y &> /dev/null || true | ||
310 | 41 | sudo apt-get update -y &> /dev/null || true | ||
311 | 42 | sudo apt-get install mojo -y || true | ||
312 | 43 | if [ -z "$(apt-cache policy mojo | grep 'Installed:')" ]; then | ||
313 | 44 | echo " ! Mojo install failed." | ||
314 | 45 | exit 1 | ||
315 | 46 | fi | ||
316 | 47 | echo "Mojo version:" | ||
317 | 48 | mojo --version | ||
318 | 49 | dpkg-query --list mojo | ||
319 | 50 | } | ||
320 | 51 | |||
321 | 52 | |||
322 | 53 | function f_osi_install() { | ||
323 | 54 | # Install or upgrade openstack-installer | ||
324 | 55 | f_line "osi install" | ||
325 | 56 | echo " + Installing or upgrading openstack-installer..." | ||
326 | 57 | sudo add-apt-repository ppa:cloud-installer/experimental -y &> /dev/null || true | ||
327 | 58 | sudo apt-get update -y &> /dev/null || true | ||
328 | 59 | sudo apt-get install openstack -y || true | ||
329 | 60 | sudo apt-get install python3-pytest -y | ||
330 | 61 | if [ -z "$(apt-cache policy openstack | grep 'Installed:')" ]; then | ||
331 | 62 | echo " ! openstack-installer install failed." | ||
332 | 63 | exit 1 | ||
333 | 64 | fi | ||
334 | 65 | echo " . openstack-install version:" | ||
335 | 66 | openstack-install --version | ||
336 | 67 | } | ||
337 | 15 | 68 | ||
338 | === modified file 'job-parts/osci_gerrit_common.sh' | |||
339 | --- job-parts/osci_gerrit_common.sh 2016-04-15 14:13:15 +0000 | |||
340 | +++ job-parts/osci_gerrit_common.sh 2016-05-18 11:59:22 +0000 | |||
341 | @@ -151,7 +151,7 @@ | |||
342 | 151 | 151 | ||
343 | 152 | function f_gerrit_set_blob_vars(){ | 152 | function f_gerrit_set_blob_vars(){ |
344 | 153 | export UOSCI_BUCKET_NAME="uosci-artifacts" | 153 | export UOSCI_BUCKET_NAME="uosci-artifacts" |
346 | 154 | export UOSCI_BLOB_STORE="http://10.245.161.162/swift/v1/${UOSCI_BUCKET_NAME}" # no trailing slash! | 154 | export UOSCI_BLOB_STORE="https://openstack-ci-reports.ubuntu.com/artifacts" # no trailing slash! |
347 | 155 | 155 | ||
348 | 156 | if [[ ! -z "$GERRIT_CHANGE_NUMBER" ]]; then | 156 | if [[ ! -z "$GERRIT_CHANGE_NUMBER" ]]; then |
349 | 157 | # GERRIT CHANGE TRIGGER | 157 | # GERRIT CHANGE TRIGGER |
350 | @@ -173,7 +173,7 @@ | |||
351 | 173 | 173 | ||
352 | 174 | f_gerrit_create_artifact_index | 174 | f_gerrit_create_artifact_index |
353 | 175 | echo "Uploading..." | 175 | echo "Uploading..." |
355 | 176 | f_novarc_undercloud | 176 | f_novarc_artifactcloud |
356 | 177 | swift upload $UOSCI_BUCKET_NAME --object-name $UOSCI_BLOB_PATH ${WORKSPACE} | 177 | swift upload $UOSCI_BUCKET_NAME --object-name $UOSCI_BLOB_PATH ${WORKSPACE} |
357 | 178 | 178 | ||
358 | 179 | # Set content-type for txt and html files | 179 | # Set content-type for txt and html files |
359 | @@ -182,7 +182,6 @@ | |||
360 | 182 | 182 | ||
361 | 183 | # Temp Debug | 183 | # Temp Debug |
362 | 184 | echo "UOSCI_BLOB_URL: ${UOSCI_BLOB_URL}" | 184 | echo "UOSCI_BLOB_URL: ${UOSCI_BLOB_URL}" |
363 | 185 | echo "Temp/private bucket: http://10.245.161.162/swift/v1/${UOSCI_BUCKET_NAME}/${UOSCI_BLOB_PATH}/index.html" | ||
364 | 186 | } | 185 | } |
365 | 187 | 186 | ||
366 | 188 | 187 | ||
367 | @@ -195,10 +194,6 @@ | |||
368 | 195 | swift post -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html | 194 | swift post -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html |
369 | 196 | swift stat $UOSCI_BUCKET_NAME index.html | 195 | swift stat $UOSCI_BUCKET_NAME index.html |
370 | 197 | set +x | 196 | set +x |
371 | 198 | |||
372 | 199 | # Temp debug | ||
373 | 200 | echo "Temp/private bucket: http://10.245.161.162/swift/v1/${UOSCI_BUCKET_NAME}/index.html" | ||
374 | 201 | curl -IL http://10.245.161.162/swift/v1/${UOSCI_BUCKET_NAME}/index.html | ||
375 | 202 | } | 197 | } |
376 | 203 | 198 | ||
377 | 204 | 199 | ||
378 | @@ -214,8 +209,7 @@ | |||
379 | 214 | 209 | ||
380 | 215 | export _MSG_START="Build ${UOSCI_GERRIT_VERDICT} by Canonical OpenStack Charm CI." | 210 | export _MSG_START="Build ${UOSCI_GERRIT_VERDICT} by Canonical OpenStack Charm CI." |
381 | 216 | 211 | ||
384 | 217 | export _MSG_MORE_INFO="- Note: We are working to expose artifact links publicly. | 212 | export _MSG_MORE_INFO="- Canonical OpenStack Charm CI Third Party Wiki: ${UOSCI_WIKI_LINK} |
383 | 218 | - Canonical OpenStack Charm CI Third Party Wiki: ${UOSCI_WIKI_LINK} | ||
385 | 219 | - OpenStack Charmers Mailing List: ${UOSCI_ML_LINK} | 213 | - OpenStack Charmers Mailing List: ${UOSCI_ML_LINK} |
386 | 220 | - Developing OpenStack Charms: ${UOSCI_COMMUNITY_README_LINK}" | 214 | - Developing OpenStack Charms: ${UOSCI_COMMUNITY_README_LINK}" |
387 | 221 | 215 | ||
388 | @@ -304,7 +298,7 @@ | |||
389 | 304 | add_line " <table>" | 298 | add_line " <table>" |
390 | 305 | 299 | ||
391 | 306 | # Get index string from key 4, reverse sort by key 2 (date) | 300 | # Get index string from key 4, reverse sort by key 2 (date) |
393 | 307 | INDICES=$(swift list uosci-artifacts -l | grep -e 'index.html$' | grep -v '^index.html' | sort -rk 2 | awk '{ print $4 }') | 301 | INDICES=$(swift list uosci-artifacts -l | grep -e 'index.html$' | grep -v ' index.html' | sort -rk 2 | awk '{ print $4 }') |
394 | 308 | 302 | ||
395 | 309 | for i in $INDICES; do | 303 | for i in $INDICES; do |
396 | 310 | # link="<a href=\"${i}\">VIEW</a>" | 304 | # link="<a href=\"${i}\">VIEW</a>" |
397 | 311 | 305 | ||
398 | === modified file 'job-parts/osci_job_common.sh' | |||
399 | --- job-parts/osci_job_common.sh 2016-04-08 14:28:16 +0000 | |||
400 | +++ job-parts/osci_job_common.sh 2016-05-18 11:59:22 +0000 | |||
401 | @@ -10,7 +10,7 @@ | |||
402 | 10 | . ${OSCI_ROOT}/job-parts/osci_jujudevel_common.sh | 10 | . ${OSCI_ROOT}/job-parts/osci_jujudevel_common.sh |
403 | 11 | . ${OSCI_ROOT}/job-parts/osci_mojo_common.sh | 11 | . ${OSCI_ROOT}/job-parts/osci_mojo_common.sh |
404 | 12 | . ${OSCI_ROOT}/job-parts/osci_osi_common.sh | 12 | . ${OSCI_ROOT}/job-parts/osci_osi_common.sh |
406 | 13 | . ${OSCI_ROOT}/job-parts/osci_vcs_common.sh | 13 | . ${OSCI_ROOT}/job-parts/osci_apt_common.sh |
407 | 14 | . ${OSCI_ROOT}/job-parts/osci_gerrit_common.sh | 14 | . ${OSCI_ROOT}/job-parts/osci_gerrit_common.sh |
408 | 15 | 15 | ||
409 | 16 | 16 | ||
410 | @@ -262,6 +262,12 @@ | |||
411 | 262 | } | 262 | } |
412 | 263 | 263 | ||
413 | 264 | 264 | ||
414 | 265 | function f_get_func_results_file() { | ||
415 | 266 | # Copy functional test results file if it exists | ||
416 | 267 | cp -fv $CO_DIR/func-results.json $WORKSPACE/func-results.json.txt 2>/dev/null ||: | ||
417 | 268 | } | ||
418 | 269 | |||
419 | 270 | |||
420 | 265 | function f_check_out_lp_branch() { | 271 | function f_check_out_lp_branch() { |
421 | 266 | # check out branch | 272 | # check out branch |
422 | 267 | if [[ -z "$BASE_NAME" ]] || [[ -z "$BRANCH" ]]; then | 273 | if [[ -z "$BASE_NAME" ]] || [[ -z "$BRANCH" ]]; then |
423 | @@ -555,6 +561,15 @@ | |||
424 | 555 | } | 561 | } |
425 | 556 | 562 | ||
426 | 557 | 563 | ||
427 | 564 | function f_remove_co_dir() { | ||
428 | 565 | # Remove asset checkout directory from workspace | ||
429 | 566 | f_line "Cleaning up deployer temp directories" | ||
430 | 567 | echo " - Removing dir: $CO_DIR" | ||
431 | 568 | cd $WORKSPACE | ||
432 | 569 | rm -rf $CO_DIR | ||
433 | 570 | } | ||
434 | 571 | |||
435 | 572 | |||
436 | 558 | function f_line() { | 573 | function f_line() { |
437 | 559 | echo "====> ${1} <=======================" | 574 | echo "====> ${1} <=======================" |
438 | 560 | } | 575 | } |
439 | 561 | 576 | ||
440 | === modified file 'job-parts/osci_jujudevel_common.sh' | |||
441 | --- job-parts/osci_jujudevel_common.sh 2016-03-04 06:14:35 +0000 | |||
442 | +++ job-parts/osci_jujudevel_common.sh 2016-05-18 11:59:22 +0000 | |||
443 | @@ -2,6 +2,11 @@ | |||
444 | 2 | # | 2 | # |
445 | 3 | # Common functions for UOSCI jobs, specific to exercising the | 3 | # Common functions for UOSCI jobs, specific to exercising the |
446 | 4 | # development version of juju. | 4 | # development version of juju. |
447 | 5 | # | ||
448 | 6 | # /!\ This is pre-juju2 legacy wares for installing, detecting and switching | ||
449 | 7 | # juju environment names based on ppa value. This will not work well | ||
450 | 8 | # when juju1 and juju2 exist in the same ppas or in the same distro mains. | ||
451 | 9 | # Refactor and deprecation underway. | ||
452 | 5 | 10 | ||
453 | 6 | export JUJU_STABLE="ppa:juju/stable" | 11 | export JUJU_STABLE="ppa:juju/stable" |
454 | 7 | export JUJU_PROPOSED="ppa:juju/proposed" | 12 | export JUJU_PROPOSED="ppa:juju/proposed" |
455 | @@ -84,10 +89,15 @@ | |||
456 | 84 | ;; | 89 | ;; |
457 | 85 | esac | 90 | esac |
458 | 86 | 91 | ||
463 | 87 | echo " + Adding juju ppa ${JUJU_SOURCE} and updating packages." | 92 | echo " ! DEPRECATED - NOT Adding or switching juju ppa ${JUJU_SOURCE} and updating packages." |
464 | 88 | sudo add-apt-repository $JUJU_SOURCE -y | 93 | echo " ! Jenkins builds no longer install/upgrade/downgrade juju binaries." |
465 | 89 | sudo apt-get update -y 2>&1 > /dev/null | 94 | # With the advent of juju2 and potential mixing of juju1 + juju2 in ppas, jobs are |
466 | 90 | sudo apt-get install juju juju-core juju-deployer amulet charm-tools -y | 95 | # no longer installing juju. All legacy slaves should remain at juju 1.x, and will |
467 | 96 | # need to be maintained/upgraded outside of the job (ie. juju run) out of band. | ||
468 | 97 | # echo " + Adding juju ppa ${JUJU_SOURCE} and updating packages." | ||
469 | 98 | # sudo add-apt-repository $JUJU_SOURCE -y | ||
470 | 99 | # sudo apt-get update -y 2>&1 > /dev/null | ||
471 | 100 | # sudo apt-get install juju juju-core juju-deployer amulet charm-tools -y | ||
472 | 91 | f_juju_version_announce | 101 | f_juju_version_announce |
473 | 92 | f_juju_enviro_switcher | 102 | f_juju_enviro_switcher |
474 | 93 | 103 | ||
475 | 94 | 104 | ||
476 | === modified file 'job-parts/osci_mojo_common.sh' | |||
477 | --- job-parts/osci_mojo_common.sh 2016-04-21 17:42:40 +0000 | |||
478 | +++ job-parts/osci_mojo_common.sh 2016-05-18 11:59:22 +0000 | |||
479 | @@ -10,22 +10,6 @@ | |||
480 | 10 | } | 10 | } |
481 | 11 | 11 | ||
482 | 12 | 12 | ||
483 | 13 | function f_mojo_install() { | ||
484 | 14 | # Install or upgrade mojo | ||
485 | 15 | echo "Installing or upgrading mojo..." | ||
486 | 16 | sudo add-apt-repository ppa:mojo-maintainers/ppa -y &> /dev/null || true | ||
487 | 17 | sudo apt-get update -y &> /dev/null || true | ||
488 | 18 | sudo apt-get install mojo -y || true | ||
489 | 19 | if [ -z "$(apt-cache policy mojo | grep 'Installed:')" ]; then | ||
490 | 20 | echo " ! Mojo install failed." | ||
491 | 21 | exit 1 | ||
492 | 22 | fi | ||
493 | 23 | echo "Mojo version:" | ||
494 | 24 | mojo --version | ||
495 | 25 | dpkg-query --list mojo | ||
496 | 26 | } | ||
497 | 27 | |||
498 | 28 | |||
499 | 29 | function f_mojo_new_project() { | 13 | function f_mojo_new_project() { |
500 | 30 | # Add mojo project. | 14 | # Add mojo project. |
501 | 31 | if [[ -n "$(ls $WORKSPACE -1 | egrep '.failed|.bad')" ]]; then | 15 | if [[ -n "$(ls $WORKSPACE -1 | egrep '.failed|.bad')" ]]; then |
502 | 32 | 16 | ||
503 | === modified file 'job-parts/osci_openstack_common.sh' | |||
504 | --- job-parts/osci_openstack_common.sh 2016-04-21 20:08:42 +0000 | |||
505 | +++ job-parts/osci_openstack_common.sh 2016-05-18 11:59:22 +0000 | |||
506 | @@ -5,11 +5,10 @@ | |||
507 | 5 | 5 | ||
508 | 6 | function f_openstack_bundle_constraint_mod() { | 6 | function f_openstack_bundle_constraint_mod() { |
509 | 7 | # Bump some constraints to minimize resource footprint on undercloud. | 7 | # Bump some constraints to minimize resource footprint on undercloud. |
515 | 8 | # FYI 4160M gets an alt flavor with ~1/2 the disk usage. | 8 | # ex. |
516 | 9 | # Undercloud should have a flavor which exactly matches mem, otherwise | 9 | # echo "Modifying bundle constraints (4G:3072M)." |
517 | 10 | # the next largest flavor (probably 8G) will be chosen. | 10 | # $OSCI_ROOT/tools/find_replace.py -yd -i "$BUNDLE_FILE" -o "$BUNDLE_FILE" -f "mem=4G" -r "mem=3072M" || touch $WORKSPACE/fyi-${test:0:4}.bundle-constraint-mod.failed |
518 | 11 | echo "Modifying bundle constraints (4G:3072M)." | 11 | echo " . FYI no bundle mem constraint modifications" |
514 | 12 | $OSCI_ROOT/tools/find_replace.py -yd -i "$BUNDLE_FILE" -o "$BUNDLE_FILE" -f "mem=4G" -r "mem=3072M" || touch $WORKSPACE/fyi-${test:0:4}.bundle-constraint-mod.failed | ||
519 | 13 | } | 12 | } |
520 | 14 | 13 | ||
521 | 15 | 14 | ||
522 | @@ -97,6 +96,95 @@ | |||
523 | 97 | } | 96 | } |
524 | 98 | 97 | ||
525 | 99 | 98 | ||
526 | 99 | function f_amulet_squash_00setup() { | ||
527 | 100 | # Guard against ppa additions and deb package installations as are | ||
528 | 101 | # customarily attempted in tests/00-setup and/or tests/setup/00-setup. | ||
529 | 102 | # That is dangerous in CI automation as we need to control the juju | ||
530 | 103 | # and related tools versions on the slaves. Just squash them here. | ||
531 | 104 | f_line "Squashing 00-setup files if they exist" | ||
532 | 105 | AMULET_SETUP_FILES="$(find ./tests -type f -executable -name 00-setup -print)" | ||
533 | 106 | if [[ ! -z "$AMULET_SETUP_FILES" ]]; then | ||
534 | 107 | for f in $AMULET_SETUP_FILES; do | ||
535 | 108 | echo " - Setting $f as non-executable (-x)" | ||
536 | 109 | chmod -x $f | ||
537 | 110 | stat $f | ||
538 | 111 | done | ||
539 | 112 | else | ||
540 | 113 | echo " . No executable amulet 00-setup file(s) found (OK)." | ||
541 | 114 | fi | ||
542 | 115 | } | ||
543 | 116 | |||
544 | 117 | |||
545 | 118 | function f_amulet_naked_test_run() { | ||
546 | 119 | # LEGACY! Run a single named amulet test. Must already be bootstrapped. | ||
547 | 120 | # This should only be used when amulet smoke tests are not defined in | ||
548 | 121 | # the charm's tox.ini. Once all charms use tox + bundletester for | ||
549 | 122 | # amulet and amulet smoke, this can be deprecated. | ||
550 | 123 | if [[ -z "$CO_DIR" ]]; then | ||
551 | 124 | echo " ! Missing the required CO_DIR env var." | ||
552 | 125 | exit 1 | ||
553 | 126 | fi | ||
554 | 127 | if [[ -z "$AMULET_TEST_NAME" ]]; then | ||
555 | 128 | echo " ! Missing the required AMULET_TEST_NAME env var." | ||
556 | 129 | exit 1 | ||
557 | 130 | fi | ||
558 | 131 | cd $CO_DIR | ||
559 | 132 | # Call the amulet test file directly | ||
560 | 133 | $AMULET_TEST_NAME |& tee $WORKSPACE/amulet-smoke.txt || true | ||
561 | 134 | if [[ "${PIPESTATUS[0]}" != "0" ]]; then | ||
562 | 135 | echo " ! Amulet smoke test failed: $AMULET_TEST_NAME." | ||
563 | 136 | touch $WORKSPACE/fyi-amulet-smoke.failed | ||
564 | 137 | fi | ||
565 | 138 | } | ||
566 | 139 | |||
567 | 140 | |||
568 | 141 | function f_amulet_smoke_select_tests_fallback() { | ||
569 | 142 | # LEGACY! Only use this if/when a tox + bundletester amulet smoke | ||
570 | 143 | # target is not defined or found. This is intended only as a fallback | ||
571 | 144 | # with automatic test selection. OpenStack charms should all eventually | ||
572 | 145 | # have tox-defined tests. | ||
573 | 146 | |||
574 | 147 | # Need to update this each cycle | ||
575 | 148 | export PREFER_CURRENT_LTS="trusty" | ||
576 | 149 | export BLACKLIST_CURRENT_OS_DEV="mitaka" | ||
577 | 150 | |||
578 | 151 | if [[ -z "$CO_DIR" ]]; then | ||
579 | 152 | echo " ! Missing the required CO_DIR env vars." | ||
580 | 153 | exit 1 | ||
581 | 154 | fi | ||
582 | 155 | cd $CO_DIR | ||
583 | 156 | |||
584 | 157 | export AMULET_TESTS_ALL="$(find ./tests -maxdepth 1 -type f -executable -print | sort)" | ||
585 | 158 | |||
586 | 159 | # Select Preferred Test: latest trusty test combo which is enabled and executable | ||
587 | 160 | # Exclude *git* (deploy-from-source) amulet test definitions. | ||
588 | 161 | export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep $PREFER_CURRENT_LTS | grep -v git | grep -v $BLACKLIST_CURRENT_OS_DEV | tail -n 1)" | ||
589 | 162 | |||
590 | 163 | # Select Alternate Test: first in lexical order which is enabled and executable | ||
591 | 164 | # Exclude *git* (deploy-from-source) amulet test definitions. | ||
592 | 165 | if [[ -z "$AMULET_TEST_NAME" ]]; then | ||
593 | 166 | export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | grep -v $BLACKLIST_CURRENT_OS_DEV | head -n 1)" | ||
594 | 167 | fi | ||
595 | 168 | |||
596 | 169 | # Still no test found based on preference or blacklist, just run with one. | ||
597 | 170 | # Exclude *git* (deploy-from-source) amulet test definitions. | ||
598 | 171 | if [[ -z "$AMULET_TEST_NAME" ]]; then | ||
599 | 172 | export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | head -n 1)" | ||
600 | 173 | fi | ||
601 | 174 | |||
602 | 175 | # Fail and bail if none found. | ||
603 | 176 | if [[ -z "$AMULET_TEST_NAME" ]]; then | ||
604 | 177 | echo " ! NO TEST FOUND - Unable to determine which amulet test to run from $CO_DIR/tests" | ||
605 | 178 | ls -al $CO_DIR/tests | ||
606 | 179 | exit 1 | ||
607 | 180 | fi | ||
608 | 181 | |||
609 | 182 | echo " . Available amulet tests:" | ||
610 | 183 | echo "$AMULET_TESTS_ALL" | ||
611 | 184 | echo " . Automatically selected test: $AMULET_TEST_NAME" | ||
612 | 185 | } | ||
613 | 186 | |||
614 | 187 | |||
615 | 100 | function f_amulet_set_odl_location() { | 188 | function f_amulet_set_odl_location() { |
616 | 101 | # Set ODL tarball location if not already set. | 189 | # Set ODL tarball location if not already set. |
617 | 102 | [[ -z "$AMULET_ODL_LOCATION" ]] && export AMULET_ODL_LOCATION='http://10.245.161.162/swift/v1/opendaylight/distribution-karaf-0.2.4-Helium-SR4.tar.gz' | 190 | [[ -z "$AMULET_ODL_LOCATION" ]] && export AMULET_ODL_LOCATION='http://10.245.161.162/swift/v1/opendaylight/distribution-karaf-0.2.4-Helium-SR4.tar.gz' |
618 | @@ -112,7 +200,6 @@ | |||
619 | 112 | 200 | ||
620 | 113 | function f_openstack_set_network_env_vars() { | 201 | function f_openstack_set_network_env_vars() { |
621 | 114 | # Inspect the bootstrap node and set network environment variables based on that | 202 | # Inspect the bootstrap node and set network environment variables based on that |
622 | 115 | dpkg-query --show ipcalc || sudo apt-get install ipcalc | ||
623 | 116 | export NAME_SERVER="$(grep nameserver /etc/resolv.conf | head -n 1 | awk '{ print $2 }' | xargs)" | 203 | export NAME_SERVER="$(grep nameserver /etc/resolv.conf | head -n 1 | awk '{ print $2 }' | xargs)" |
624 | 117 | export NET_ID="$(grep network ~/.juju/environments.yaml | head -n 1 | awk '{ print $2 }')" | 204 | export NET_ID="$(grep network ~/.juju/environments.yaml | head -n 1 | awk '{ print $2 }')" |
625 | 118 | 205 | ||
626 | @@ -184,7 +271,6 @@ | |||
627 | 184 | # Predictively set network environment variables before deployment exists | 271 | # Predictively set network environment variables before deployment exists |
628 | 185 | f_novarc_undercloud | 272 | f_novarc_undercloud |
629 | 186 | 273 | ||
630 | 187 | dpkg-query --show ipcalc || sudo apt-get install ipcalc | ||
631 | 188 | export NAME_SERVER="$(grep nameserver /etc/resolv.conf | head -n 1 | awk '{ print $2 }' | xargs)" | 274 | export NAME_SERVER="$(grep nameserver /etc/resolv.conf | head -n 1 | awk '{ print $2 }' | xargs)" |
632 | 189 | export NET_ID="$(grep network ~/.juju/environments.yaml | head -n 1 | awk '{ print $2 }')" | 275 | export NET_ID="$(grep network ~/.juju/environments.yaml | head -n 1 | awk '{ print $2 }')" |
633 | 190 | export SUBNET_ID="$(neutron net-show $NET_ID | grep subnets | awk '{ print $4 }')" | 276 | export SUBNET_ID="$(neutron net-show $NET_ID | grep subnets | awk '{ print $4 }')" |
634 | @@ -256,6 +342,12 @@ | |||
635 | 256 | echo " ! Configure failed." | 342 | echo " ! Configure failed." |
636 | 257 | touch $WORKSPACE/fyi-${test:0:4}.configure.failed | 343 | touch $WORKSPACE/fyi-${test:0:4}.configure.failed |
637 | 258 | fi | 344 | fi |
638 | 345 | |||
639 | 346 | # Heat requires an action for Kilo and later to enable authorization | ||
640 | 347 | if [[ "$OPENSTACK_RELEASE" != *icehouse* ]]; then | ||
641 | 348 | echo " . Running domain-setup action on heat/0..." | ||
642 | 349 | juju action do --format=json heat/0 domain-setup | ||
643 | 350 | fi | ||
644 | 259 | } | 351 | } |
645 | 260 | 352 | ||
646 | 261 | 353 | ||
647 | @@ -275,7 +367,6 @@ | |||
648 | 275 | 367 | ||
649 | 276 | 368 | ||
650 | 277 | function f_openstack_tempest_venv() { | 369 | function f_openstack_tempest_venv() { |
651 | 278 | sudo apt-get install python-virtualenv libffi-dev libssl-dev -y | ||
652 | 279 | cd $OPENSTACK_CHARM_TESTING_ROOT/tempest | 370 | cd $OPENSTACK_CHARM_TESTING_ROOT/tempest |
653 | 280 | virtualenv .venv | 371 | virtualenv .venv |
654 | 281 | .venv/bin/pip install -r requirements.txt | 372 | .venv/bin/pip install -r requirements.txt |
655 | @@ -411,6 +502,12 @@ | |||
656 | 411 | } | 502 | } |
657 | 412 | 503 | ||
658 | 413 | 504 | ||
659 | 505 | function f_novarc_artifactcloud() { | ||
660 | 506 | echo " . Sourcing artifactcloud novarc." | ||
661 | 507 | . ~/novarc-artifactcloud | ||
662 | 508 | } | ||
663 | 509 | |||
664 | 510 | |||
665 | 414 | function f_flavor_shrink() { | 511 | function f_flavor_shrink() { |
666 | 415 | # Shrink flavors for smaller/faster testing | 512 | # Shrink flavors for smaller/faster testing |
667 | 416 | echo " + Shrinking flavors." | 513 | echo " + Shrinking flavors." |
668 | 417 | 514 | ||
669 | === modified file 'job-parts/osci_osi_common.sh' | |||
670 | --- job-parts/osci_osi_common.sh 2016-03-04 05:37:48 +0000 | |||
671 | +++ job-parts/osci_osi_common.sh 2016-05-18 11:59:22 +0000 | |||
672 | @@ -35,21 +35,6 @@ | |||
673 | 35 | } | 35 | } |
674 | 36 | 36 | ||
675 | 37 | 37 | ||
676 | 38 | function f_osi_install() { | ||
677 | 39 | # Install or upgrade openstack-installer | ||
678 | 40 | echo " + Installing or upgrading openstack-installer..." | ||
679 | 41 | sudo add-apt-repository ppa:cloud-installer/experimental -y &> /dev/null || true | ||
680 | 42 | sudo apt-get update -y &> /dev/null || true | ||
681 | 43 | sudo apt-get install openstack -y || true | ||
682 | 44 | if [ -z "$(apt-cache policy openstack | grep 'Installed:')" ]; then | ||
683 | 45 | echo " ! openstack-installer install failed." | ||
684 | 46 | exit 1 | ||
685 | 47 | fi | ||
686 | 48 | echo " . openstack-install version:" | ||
687 | 49 | openstack-install --version | ||
688 | 50 | } | ||
689 | 51 | |||
690 | 52 | |||
691 | 53 | function f_osi_config_file_pull_and_sanitize() { | 38 | function f_osi_config_file_pull_and_sanitize() { |
692 | 54 | # Pull openstack-installer config yaml to workspace (sanitize keys and passwords) | 39 | # Pull openstack-installer config yaml to workspace (sanitize keys and passwords) |
693 | 55 | DEST_FILE="$WORKSPACE/osi-config.yaml" | 40 | DEST_FILE="$WORKSPACE/osi-config.yaml" |
694 | @@ -263,7 +248,6 @@ | |||
695 | 263 | "multi"|"single"|"autopilot") | 248 | "multi"|"single"|"autopilot") |
696 | 264 | echo " . Starting OSI built-in ${OSI_MODE} mode test..." | 249 | echo " . Starting OSI built-in ${OSI_MODE} mode test..." |
697 | 265 | f_osi_refresh | 250 | f_osi_refresh |
698 | 266 | dpkg-query --show python3-pytest || sudo apt-get install python3-pytest -y | ||
699 | 267 | cd $OSI_ROOT/integration | 251 | cd $OSI_ROOT/integration |
700 | 268 | py.test-3 tests/test_${OSI_MODE}.py |& tee $WORKSPACE/osi-test-${OSI_MODE}.txt | 252 | py.test-3 tests/test_${OSI_MODE}.py |& tee $WORKSPACE/osi-test-${OSI_MODE}.txt |
701 | 269 | ret_code=${PIPESTATUS[0]} | 253 | ret_code=${PIPESTATUS[0]} |
702 | 270 | 254 | ||
703 | === modified file 'job-parts/osci_tools_common.sh' | |||
704 | --- job-parts/osci_tools_common.sh 2016-03-09 19:26:45 +0000 | |||
705 | +++ job-parts/osci_tools_common.sh 2016-05-18 11:59:22 +0000 | |||
706 | @@ -46,8 +46,6 @@ | |||
707 | 46 | [[ -z "$MIG_TOOLS_REPO" ]] && export MIG_TOOLS_REPO="https://github.com/openstack-charmers/migration-tools" | 46 | [[ -z "$MIG_TOOLS_REPO" ]] && export MIG_TOOLS_REPO="https://github.com/openstack-charmers/migration-tools" |
708 | 47 | [[ -z "$MIG_TOOLS_ROOT" ]] && export MIG_TOOLS_ROOT="$HOME/tools/migration-tools" | 47 | [[ -z "$MIG_TOOLS_ROOT" ]] && export MIG_TOOLS_ROOT="$HOME/tools/migration-tools" |
709 | 48 | 48 | ||
710 | 49 | dpkg-query --show bzr-fastimport || sudo apt-get install bzr-fastimport -y | ||
711 | 50 | |||
712 | 51 | if [[ -d $MIG_TOOLS_ROOT ]]; then | 49 | if [[ -d $MIG_TOOLS_ROOT ]]; then |
713 | 52 | echo " - Removing existing dir @ $MIG_TOOLS_ROOT" | 50 | echo " - Removing existing dir @ $MIG_TOOLS_ROOT" |
714 | 53 | rm -rf $MIG_TOOLS_ROOT | 51 | rm -rf $MIG_TOOLS_ROOT |
charm_lint_check #2569 lp:ubuntu-openstack-ci for 1chb1n mp294675
LINT OK: passed
Build: http:// 10.245. 162.36: 8080/job/ charm_lint_ check/2569/