Merge lp:~1chb1n/ubuntu-openstack-ci/artifact-move into lp:ubuntu-openstack-ci

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
Reviewer Review Type Date Requested Status
Ubuntu OpenStack CI Team Pending
Review via email: mp+294675@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

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/

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

Build: http://10.245.162.36:8080/job/charm_lint_check/2579/

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

Build: http://10.245.162.36:8080/job/charm_lint_check/2598/

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

Build: http://10.245.162.36:8080/job/charm_lint_check/2619/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2015-02-18 04:49:11 +0000
+++ .bzrignore 2016-05-18 11:59:22 +0000
@@ -15,3 +15,4 @@
15deployment/jobs/jobs-static-initial.tgz15deployment/jobs/jobs-static-initial.tgz
16temp.py16temp.py
17.coverage17.coverage
18deployment/deploy-files/novarc-artifactcloud
1819
=== added file 'admin/822-novarc-artifactweb-credentials-distribute.sh'
--- admin/822-novarc-artifactweb-credentials-distribute.sh 1970-01-01 00:00:00 +0000
+++ admin/822-novarc-artifactweb-credentials-distribute.sh 2016-05-18 11:59:22 +0000
@@ -0,0 +1,29 @@
1#!/bin/bash -e
2echo $0
3
4# Copy artifactcloud credentials file to all nodes
5# Requires that you have placed credentials in the deploy-files dir
6
7. $(dirname $0)/../env-common
8
9f_name="novarc-artifactcloud"
10f_dst_dir="${JENKINS_HOME}"
11f_dst="${f_dst_dir}/${f_name}"
12f_tmp="${U_HOME}/${f_name}"
13f_src_dir="../deployment/deploy-files"
14f_src="${f_src_dir}/${f_name}"
15
16if [ ! -f "$f_src" ]; then
17 echo "Local source file ${f_src} not found."
18 pwd
19 exit 1
20fi
21
22for unit in $UNITS; do
23 echo "copying ${f_src} into ${unit}"
24 juju scp $f_src ${unit}:${f_tmp}
25 echo "adjusting permissions"
26 juju ssh $unit "sudo mv $f_tmp $f_dst &&\
27 sudo chown jenkins:jenkins ${f_dst} &&\
28 sudo chmod 600 ${f_dst}"
29done
030
=== modified file 'job-parts/build_amulet_smoke.sh'
--- job-parts/build_amulet_smoke.sh 2016-04-05 17:47:28 +0000
+++ job-parts/build_amulet_smoke.sh 2016-05-18 11:59:22 +0000
@@ -4,69 +4,27 @@
4# Source the common functions4# Source the common functions
5. ${OSCI_ROOT}/job-parts/osci_job_common.sh5. ${OSCI_ROOT}/job-parts/osci_job_common.sh
66
7PREFER_CURRENT_LTS="trusty"
8BLACKLIST_CURRENT_OS_DEV="mitaka"
9
10f_fresh_clean_start7f_fresh_clean_start
11f_check_out_universal8f_check_out_universal
9f_amulet_squash_00setup
10f_amulet_set_network_env_vars
11f_env_no_pass
1212
13f_line "Begin amulet smoke"13f_line "Begin amulet smoke"
14cd $CO_DIR14cd $CO_DIR
15export AMULET_TESTS_ALL="$(find ./tests -maxdepth 1 -type f -executable -print | sort)"15if grep "\[testenv:func27-smoke\]" tox.ini; then
1616 # Look for a func27-smoke tox target and run it as the first preference.
17# Select Preferred Test: latest trusty test combo which is enabled and executable17 tox -e func27-smoke
18# Exclude *git* (deploy-from-source) amulet test definitions.
19export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep $PREFER_CURRENT_LTS | grep -v git | grep -v $BLACKLIST_CURRENT_OS_DEV | tail -n 1)"
20
21# Select Alternate Test: first in lexical order which is enabled and executable
22# Exclude *git* (deploy-from-source) amulet test definitions.
23if [[ -z "$AMULET_TEST_NAME" ]]; then
24 export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | grep -v $BLACKLIST_CURRENT_OS_DEV | head -n 1)"
25fi
26
27# Still no test found based on preference or blacklist, just run with one.
28# Exclude *git* (deploy-from-source) amulet test definitions.
29if [[ -z "$AMULET_TEST_NAME" ]]; then
30 export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | head -n 1)"
31fi
32
33# Look for 00-setup (amulet dependencies installer) and exec if found
34AMULET_SETUP="$(find ./tests -type f -executable -name 00-setup -print | head -n 1)"
35if [[ ! -z "$AMULET_SETUP" ]]; then
36 echo " . Executing amulet setup: $AMULET_SETUP"
37 $AMULET_SETUP
38else18else
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.
40fi20 echo " ! Tox-based amulet smoke target not found, falling back to automatic test selection."
4121 f_amulet_smoke_select_tests_fallback
42f_amulet_set_network_env_vars22 f_juju_bootstrap
43f_env_no_pass23 f_amulet_naked_test_run
4424fi
45if [[ -z "$AMULET_TEST_NAME" ]]; then
46 echo " ! Unable to determine which amulet test to run from $CO_DIR/tests"
47 ls -al $CO_DIR/tests
48 exit 1
49fi
50
51echo " . Available amulet tests:"
52echo "$AMULET_TESTS_ALL"
53echo " . Automatically selected test: $AMULET_TEST_NAME"
54
55f_juju_bootstrap
56
57cd $CO_DIR
58$AMULET_TEST_NAME |& tee $WORKSPACE/amulet-smoke.txt || true
59if [[ "${PIPESTATUS[0]}" != "0" ]]; then
60 echo " ! Amulet smoke test failed: $AMULET_TEST_NAME."
61 touch $WORKSPACE/fyi-amulet-smoke.failed
62fi
63
64f_line "Cleaning up deployer temp directories"
65echo " - Removing dir: $CO_DIR"
66cd $WORKSPACE
67rm -rf $CO_DIR
68f_line "End amulet smoke"25f_line "End amulet smoke"
6926
27f_remove_co_dir
70f_collect_juju_logs28f_collect_juju_logs
71f_set_build_descr29f_set_build_descr
72f_nice_finish30f_nice_finish
7331
=== modified file 'job-parts/build_amulet_test.sh'
--- job-parts/build_amulet_test.sh 2016-02-29 19:46:17 +0000
+++ job-parts/build_amulet_test.sh 2016-05-18 11:59:22 +0000
@@ -5,7 +5,7 @@
5# Makefile command search strings, first match wins5# Makefile command search strings, first match wins
6sstring[0]="@juju test"6sstring[0]="@juju test"
7sstring[1]=".venv/bin/bundletester"7sstring[1]=".venv/bin/bundletester"
8#sstring[2]=""8sstring[2]="@tox -e func27"
9#sstring[3]=""9#sstring[3]=""
10#sstring[4]=""10#sstring[4]=""
1111
@@ -28,6 +28,7 @@
28f_line "begin amulet test"28f_line "begin amulet test"
29f_juju_get_pkg_info juju-pkg-info.txt29f_juju_get_pkg_info juju-pkg-info.txt
30f_run_makefile_test30f_run_makefile_test
31f_get_func_results_file
31f_line "end amulet test"32f_line "end amulet test"
3233
33f_collect_juju_logs34f_collect_juju_logs
3435
=== modified file 'job-parts/build_bucket_junk_cleanup.sh'
--- job-parts/build_bucket_junk_cleanup.sh 2016-04-15 03:53:13 +0000
+++ job-parts/build_bucket_junk_cleanup.sh 2016-05-18 11:59:22 +0000
@@ -4,7 +4,7 @@
44
5f_gerrit_set_blob_vars5f_gerrit_set_blob_vars
6env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort6env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort
7f_novarc_undercloud7f_novarc_artifactcloud
88
99
10f_line "Deleting junk objects"10f_line "Deleting junk objects"
1111
=== modified file 'job-parts/build_bucket_reset_object_headers.sh'
--- job-parts/build_bucket_reset_object_headers.sh 2016-04-15 03:53:13 +0000
+++ job-parts/build_bucket_reset_object_headers.sh 2016-05-18 11:59:22 +0000
@@ -4,7 +4,7 @@
44
5f_gerrit_set_blob_vars5f_gerrit_set_blob_vars
6env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort6env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort
7f_novarc_undercloud7f_novarc_artifactcloud
88
9f_bucket_reset_txt_html_object_headers9f_bucket_reset_txt_html_object_headers
1010
1111
=== modified file 'job-parts/build_bucket_update_indices.sh'
--- job-parts/build_bucket_update_indices.sh 2016-04-15 03:53:13 +0000
+++ job-parts/build_bucket_update_indices.sh 2016-05-18 11:59:22 +0000
@@ -4,7 +4,7 @@
44
5f_gerrit_set_blob_vars5f_gerrit_set_blob_vars
6env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort6env | egrep "BUILD|JOB_|GERRIT|UOSCI|HUDSON|JENKINS|WORKSPACE" | sort
7f_novarc_undercloud7f_novarc_artifactcloud
88
9f_bucket_create_index_of_indices9f_bucket_create_index_of_indices
10f_bucket_upload_index_of_indices10f_bucket_upload_index_of_indices
1111
=== modified file 'job-parts/build_charm_single.sh'
--- job-parts/build_charm_single.sh 2016-04-22 16:23:41 +0000
+++ job-parts/build_charm_single.sh 2016-05-18 11:59:22 +0000
@@ -12,10 +12,10 @@
12# Gerrit-triggered jobs will pass GERRIT_BRANCH, while other legacy12# Gerrit-triggered jobs will pass GERRIT_BRANCH, while other legacy
13# jobs will pass GIT_BRANCH.13# jobs will pass GIT_BRANCH.
14if [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != *stable* ]] && [[ "$GIT_BRANCH" != *stable* ]]; then14if [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != *stable* ]] && [[ "$GIT_BRANCH" != *stable* ]]; then
15 # Master15 # Master (dev)
16 export SUPPORTED_SERIES="trusty wily xenial"16 export SUPPORTED_SERIES="trusty wily xenial"
17elif [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != "master" ]] && [[ "$GIT_BRANCH" != "master" ]]; then17elif [[ -z "$SUPPORTED_SERIES" ]] && [[ "$GERRIT_BRANCH" != "master" ]] && [[ "$GIT_BRANCH" != "master" ]]; then
18 # Stable18 # Stable (released)
19 export SUPPORTED_SERIES="trusty wily xenial"19 export SUPPORTED_SERIES="trusty wily xenial"
20else20else
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"
2222
=== added file 'job-parts/build_maint_nodes.sh'
--- job-parts/build_maint_nodes.sh 1970-01-01 00:00:00 +0000
+++ job-parts/build_maint_nodes.sh 2016-05-18 11:59:22 +0000
@@ -0,0 +1,27 @@
1#!/bin/bash -e
2# Build script to perform periodic jenkins master/slave maintenance tasks
3
4# Source the common functions
5. ${OSCI_ROOT}/job-parts/osci_job_common.sh
6
7# Prep environment
8f_skip_juju_lxc
9f_fresh_clean_start
10f_env_no_pass
11
12# Install/update to the latest version of mojo
13f_mojo_install
14
15# Install/update to the latest version of openstack-installer
16f_osi_install
17
18# Install/update to the latest version of git and bzr tools
19f_vcs_tools_install
20
21# Install update misc tools
22f_misc_global_tools_install
23
24# Wrap up
25f_set_build_descr
26f_nice_finish
27f_check_fail
028
=== modified file 'job-parts/build_mojo_runner.sh'
--- job-parts/build_mojo_runner.sh 2016-02-29 21:54:46 +0000
+++ job-parts/build_mojo_runner.sh 2016-05-18 11:59:22 +0000
@@ -32,7 +32,6 @@
32# Prep environment32# Prep environment
33f_fresh_clean_start33f_fresh_clean_start
34f_env_no_pass34f_env_no_pass
35f_mojo_install
3635
37f_line "validating mojo runner env vars"36f_line "validating mojo runner env vars"
38f_mojo_handle_env_vars37f_mojo_handle_env_vars
3938
=== modified file 'job-parts/build_osi.sh'
--- job-parts/build_osi.sh 2015-11-21 14:39:51 +0000
+++ job-parts/build_osi.sh 2016-05-18 11:59:22 +0000
@@ -38,7 +38,6 @@
38f_env_no_pass38f_env_no_pass
39f_touch_try39f_touch_try
40f_amulet_set_network_env_vars40f_amulet_set_network_env_vars
41f_osi_install
4241
43# Go!42# Go!
44f_line "Deploy via OSI (openstack-installer mode: ${OSI_MODE})"43f_line "Deploy via OSI (openstack-installer mode: ${OSI_MODE})"
4544
=== renamed file 'job-parts/osci_vcs_common.sh' => 'job-parts/osci_apt_common.sh'
--- job-parts/osci_vcs_common.sh 2016-02-24 19:45:46 +0000
+++ job-parts/osci_apt_common.sh 2016-05-18 11:59:22 +0000
@@ -2,13 +2,66 @@
2#2#
3# Common functions for UOSCI vcs systems (publicly-available information only!)3# Common functions for UOSCI vcs systems (publicly-available information only!)
44
5
5function f_vcs_configure() {6function f_vcs_configure() {
6 dpkg-query --show bzr || sudo apt-get install bzr -y7f_line "vcs configure"
7 dpkg-query --show git || sudo apt-get install git -y
8 dpkg-query --show git-review || sudo apt-get install git-review -y
9 bzr whoami "uoscibot <uosci-testing-bot@ubuntu.com>"8 bzr whoami "uoscibot <uosci-testing-bot@ubuntu.com>"
10 bzr launchpad-login uosci-testing-bot9 bzr launchpad-login uosci-testing-bot
11 git config --global user.email "uosci-testing-bot@ubuntu.com"10 git config --global user.email "uosci-testing-bot@ubuntu.com"
12 git config --global user.name "uoscibot"11 git config --global user.name "uoscibot"
13 git config --global gitreview.username "uosci-testing-bot"12 git config --global gitreview.username "uosci-testing-bot"
14}13}
14
15
16function f_vcs_tools_install() {
17# VCS packages to keep installed and updated on all master/slaves
18f_line "vcs tools install"
19 sudo apt-get update -y &> /dev/null || true
20 sudo apt-get install bzr -y
21 sudo apt-get install git -y
22 sudo apt-get install git-review -y
23}
24
25
26function f_misc_global_tools_install() {
27# Misc packages to keep installed and updated on all master/slaves
28f_line "misc global tools install"
29 sudo apt-get update -y &> /dev/null || true
30 sudo apt-get install ipcalc -y
31 sudo apt-get install bzr-fastimport -y
32 sudo apt-get install python-virtualenv libffi-dev libssl-dev -y
33}
34
35
36function f_mojo_install() {
37# Install or upgrade mojo
38f_line "mojo install"
39 echo "Installing or upgrading mojo..."
40 sudo add-apt-repository ppa:mojo-maintainers/ppa -y &> /dev/null || true
41 sudo apt-get update -y &> /dev/null || true
42 sudo apt-get install mojo -y || true
43 if [ -z "$(apt-cache policy mojo | grep 'Installed:')" ]; then
44 echo " ! Mojo install failed."
45 exit 1
46 fi
47 echo "Mojo version:"
48 mojo --version
49 dpkg-query --list mojo
50}
51
52
53function f_osi_install() {
54# Install or upgrade openstack-installer
55f_line "osi install"
56 echo " + Installing or upgrading openstack-installer..."
57 sudo add-apt-repository ppa:cloud-installer/experimental -y &> /dev/null || true
58 sudo apt-get update -y &> /dev/null || true
59 sudo apt-get install openstack -y || true
60 sudo apt-get install python3-pytest -y
61 if [ -z "$(apt-cache policy openstack | grep 'Installed:')" ]; then
62 echo " ! openstack-installer install failed."
63 exit 1
64 fi
65 echo " . openstack-install version:"
66 openstack-install --version
67}
1568
=== modified file 'job-parts/osci_gerrit_common.sh'
--- job-parts/osci_gerrit_common.sh 2016-04-15 14:13:15 +0000
+++ job-parts/osci_gerrit_common.sh 2016-05-18 11:59:22 +0000
@@ -151,7 +151,7 @@
151151
152function f_gerrit_set_blob_vars(){152function f_gerrit_set_blob_vars(){
153 export UOSCI_BUCKET_NAME="uosci-artifacts"153 export UOSCI_BUCKET_NAME="uosci-artifacts"
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!
155155
156 if [[ ! -z "$GERRIT_CHANGE_NUMBER" ]]; then156 if [[ ! -z "$GERRIT_CHANGE_NUMBER" ]]; then
157 # GERRIT CHANGE TRIGGER157 # GERRIT CHANGE TRIGGER
@@ -173,7 +173,7 @@
173173
174 f_gerrit_create_artifact_index174 f_gerrit_create_artifact_index
175 echo "Uploading..."175 echo "Uploading..."
176 f_novarc_undercloud176 f_novarc_artifactcloud
177 swift upload $UOSCI_BUCKET_NAME --object-name $UOSCI_BLOB_PATH ${WORKSPACE}177 swift upload $UOSCI_BUCKET_NAME --object-name $UOSCI_BLOB_PATH ${WORKSPACE}
178178
179 # Set content-type for txt and html files179 # Set content-type for txt and html files
@@ -182,7 +182,6 @@
182182
183 # Temp Debug183 # Temp Debug
184 echo "UOSCI_BLOB_URL: ${UOSCI_BLOB_URL}"184 echo "UOSCI_BLOB_URL: ${UOSCI_BLOB_URL}"
185 echo "Temp/private bucket: http://10.245.161.162/swift/v1/${UOSCI_BUCKET_NAME}/${UOSCI_BLOB_PATH}/index.html"
186}185}
187186
188187
@@ -195,10 +194,6 @@
195 swift post -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html194 swift post -H "content-type:text/html" $UOSCI_BUCKET_NAME index.html
196 swift stat $UOSCI_BUCKET_NAME index.html195 swift stat $UOSCI_BUCKET_NAME index.html
197 set +x196 set +x
198
199 # Temp debug
200 echo "Temp/private bucket: http://10.245.161.162/swift/v1/${UOSCI_BUCKET_NAME}/index.html"
201 curl -IL http://10.245.161.162/swift/v1/${UOSCI_BUCKET_NAME}/index.html
202}197}
203198
204199
@@ -214,8 +209,7 @@
214209
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."
216211
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}
218- Canonical OpenStack Charm CI Third Party Wiki: ${UOSCI_WIKI_LINK}
219- OpenStack Charmers Mailing List: ${UOSCI_ML_LINK}213- OpenStack Charmers Mailing List: ${UOSCI_ML_LINK}
220- Developing OpenStack Charms: ${UOSCI_COMMUNITY_README_LINK}"214- Developing OpenStack Charms: ${UOSCI_COMMUNITY_README_LINK}"
221215
@@ -304,7 +298,7 @@
304 add_line " <table>"298 add_line " <table>"
305299
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)
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 }')
308302
309 for i in $INDICES; do303 for i in $INDICES; do
310 # link="<a href=\"${i}\">VIEW</a>"304 # link="<a href=\"${i}\">VIEW</a>"
311305
=== modified file 'job-parts/osci_job_common.sh'
--- job-parts/osci_job_common.sh 2016-04-08 14:28:16 +0000
+++ job-parts/osci_job_common.sh 2016-05-18 11:59:22 +0000
@@ -10,7 +10,7 @@
10. ${OSCI_ROOT}/job-parts/osci_jujudevel_common.sh10. ${OSCI_ROOT}/job-parts/osci_jujudevel_common.sh
11. ${OSCI_ROOT}/job-parts/osci_mojo_common.sh11. ${OSCI_ROOT}/job-parts/osci_mojo_common.sh
12. ${OSCI_ROOT}/job-parts/osci_osi_common.sh12. ${OSCI_ROOT}/job-parts/osci_osi_common.sh
13. ${OSCI_ROOT}/job-parts/osci_vcs_common.sh13. ${OSCI_ROOT}/job-parts/osci_apt_common.sh
14. ${OSCI_ROOT}/job-parts/osci_gerrit_common.sh14. ${OSCI_ROOT}/job-parts/osci_gerrit_common.sh
1515
1616
@@ -262,6 +262,12 @@
262}262}
263263
264264
265function f_get_func_results_file() {
266# Copy functional test results file if it exists
267 cp -fv $CO_DIR/func-results.json $WORKSPACE/func-results.json.txt 2>/dev/null ||:
268}
269
270
265function f_check_out_lp_branch() {271function f_check_out_lp_branch() {
266# check out branch272# check out branch
267 if [[ -z "$BASE_NAME" ]] || [[ -z "$BRANCH" ]]; then273 if [[ -z "$BASE_NAME" ]] || [[ -z "$BRANCH" ]]; then
@@ -555,6 +561,15 @@
555}561}
556562
557563
564function f_remove_co_dir() {
565# Remove asset checkout directory from workspace
566 f_line "Cleaning up deployer temp directories"
567 echo " - Removing dir: $CO_DIR"
568 cd $WORKSPACE
569 rm -rf $CO_DIR
570}
571
572
558function f_line() {573function f_line() {
559 echo "====> ${1} <======================="574 echo "====> ${1} <======================="
560}575}
561576
=== modified file 'job-parts/osci_jujudevel_common.sh'
--- job-parts/osci_jujudevel_common.sh 2016-03-04 06:14:35 +0000
+++ job-parts/osci_jujudevel_common.sh 2016-05-18 11:59:22 +0000
@@ -2,6 +2,11 @@
2#2#
3# Common functions for UOSCI jobs, specific to exercising the3# Common functions for UOSCI jobs, specific to exercising the
4# development version of juju.4# development version of juju.
5#
6# /!\ This is pre-juju2 legacy wares for installing, detecting and switching
7# juju environment names based on ppa value. This will not work well
8# when juju1 and juju2 exist in the same ppas or in the same distro mains.
9# Refactor and deprecation underway.
510
6export JUJU_STABLE="ppa:juju/stable"11export JUJU_STABLE="ppa:juju/stable"
7export JUJU_PROPOSED="ppa:juju/proposed"12export JUJU_PROPOSED="ppa:juju/proposed"
@@ -84,10 +89,15 @@
84 ;;89 ;;
85 esac90 esac
8691
87 echo " + Adding juju ppa ${JUJU_SOURCE} and updating packages."92 echo " ! DEPRECATED - NOT Adding or switching juju ppa ${JUJU_SOURCE} and updating packages."
88 sudo add-apt-repository $JUJU_SOURCE -y93 echo " ! Jenkins builds no longer install/upgrade/downgrade juju binaries."
89 sudo apt-get update -y 2>&1 > /dev/null94# With the advent of juju2 and potential mixing of juju1 + juju2 in ppas, jobs are
90 sudo apt-get install juju juju-core juju-deployer amulet charm-tools -y95# no longer installing juju. All legacy slaves should remain at juju 1.x, and will
96# need to be maintained/upgraded outside of the job (ie. juju run) out of band.
97# echo " + Adding juju ppa ${JUJU_SOURCE} and updating packages."
98# sudo add-apt-repository $JUJU_SOURCE -y
99# sudo apt-get update -y 2>&1 > /dev/null
100# sudo apt-get install juju juju-core juju-deployer amulet charm-tools -y
91 f_juju_version_announce101 f_juju_version_announce
92 f_juju_enviro_switcher102 f_juju_enviro_switcher
93103
94104
=== modified file 'job-parts/osci_mojo_common.sh'
--- job-parts/osci_mojo_common.sh 2016-04-21 17:42:40 +0000
+++ job-parts/osci_mojo_common.sh 2016-05-18 11:59:22 +0000
@@ -10,22 +10,6 @@
10}10}
1111
1212
13function f_mojo_install() {
14# Install or upgrade mojo
15 echo "Installing or upgrading mojo..."
16 sudo add-apt-repository ppa:mojo-maintainers/ppa -y &> /dev/null || true
17 sudo apt-get update -y &> /dev/null || true
18 sudo apt-get install mojo -y || true
19 if [ -z "$(apt-cache policy mojo | grep 'Installed:')" ]; then
20 echo " ! Mojo install failed."
21 exit 1
22 fi
23 echo "Mojo version:"
24 mojo --version
25 dpkg-query --list mojo
26}
27
28
29function f_mojo_new_project() {13function f_mojo_new_project() {
30# Add mojo project.14# Add mojo project.
31 if [[ -n "$(ls $WORKSPACE -1 | egrep '.failed|.bad')" ]]; then15 if [[ -n "$(ls $WORKSPACE -1 | egrep '.failed|.bad')" ]]; then
3216
=== modified file 'job-parts/osci_openstack_common.sh'
--- job-parts/osci_openstack_common.sh 2016-04-21 20:08:42 +0000
+++ job-parts/osci_openstack_common.sh 2016-05-18 11:59:22 +0000
@@ -5,11 +5,10 @@
55
6function f_openstack_bundle_constraint_mod() {6function f_openstack_bundle_constraint_mod() {
7# Bump some constraints to minimize resource footprint on undercloud.7# Bump some constraints to minimize resource footprint on undercloud.
8# FYI 4160M gets an alt flavor with ~1/2 the disk usage.8# ex.
9# Undercloud should have a flavor which exactly matches mem, otherwise9# echo "Modifying bundle constraints (4G:3072M)."
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
11 echo "Modifying bundle constraints (4G:3072M)."11echo " . FYI no bundle mem constraint modifications"
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
13}12}
1413
1514
@@ -97,6 +96,95 @@
97}96}
9897
9998
99function f_amulet_squash_00setup() {
100# Guard against ppa additions and deb package installations as are
101# customarily attempted in tests/00-setup and/or tests/setup/00-setup.
102# That is dangerous in CI automation as we need to control the juju
103# and related tools versions on the slaves. Just squash them here.
104 f_line "Squashing 00-setup files if they exist"
105 AMULET_SETUP_FILES="$(find ./tests -type f -executable -name 00-setup -print)"
106 if [[ ! -z "$AMULET_SETUP_FILES" ]]; then
107 for f in $AMULET_SETUP_FILES; do
108 echo " - Setting $f as non-executable (-x)"
109 chmod -x $f
110 stat $f
111 done
112 else
113 echo " . No executable amulet 00-setup file(s) found (OK)."
114 fi
115}
116
117
118function f_amulet_naked_test_run() {
119# LEGACY! Run a single named amulet test. Must already be bootstrapped.
120# This should only be used when amulet smoke tests are not defined in
121# the charm's tox.ini. Once all charms use tox + bundletester for
122# amulet and amulet smoke, this can be deprecated.
123 if [[ -z "$CO_DIR" ]]; then
124 echo " ! Missing the required CO_DIR env var."
125 exit 1
126 fi
127 if [[ -z "$AMULET_TEST_NAME" ]]; then
128 echo " ! Missing the required AMULET_TEST_NAME env var."
129 exit 1
130 fi
131 cd $CO_DIR
132 # Call the amulet test file directly
133 $AMULET_TEST_NAME |& tee $WORKSPACE/amulet-smoke.txt || true
134 if [[ "${PIPESTATUS[0]}" != "0" ]]; then
135 echo " ! Amulet smoke test failed: $AMULET_TEST_NAME."
136 touch $WORKSPACE/fyi-amulet-smoke.failed
137 fi
138}
139
140
141function f_amulet_smoke_select_tests_fallback() {
142# LEGACY! Only use this if/when a tox + bundletester amulet smoke
143# target is not defined or found. This is intended only as a fallback
144# with automatic test selection. OpenStack charms should all eventually
145# have tox-defined tests.
146
147 # Need to update this each cycle
148 export PREFER_CURRENT_LTS="trusty"
149 export BLACKLIST_CURRENT_OS_DEV="mitaka"
150
151 if [[ -z "$CO_DIR" ]]; then
152 echo " ! Missing the required CO_DIR env vars."
153 exit 1
154 fi
155 cd $CO_DIR
156
157 export AMULET_TESTS_ALL="$(find ./tests -maxdepth 1 -type f -executable -print | sort)"
158
159 # Select Preferred Test: latest trusty test combo which is enabled and executable
160 # Exclude *git* (deploy-from-source) amulet test definitions.
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)"
162
163 # Select Alternate Test: first in lexical order which is enabled and executable
164 # Exclude *git* (deploy-from-source) amulet test definitions.
165 if [[ -z "$AMULET_TEST_NAME" ]]; then
166 export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | grep -v $BLACKLIST_CURRENT_OS_DEV | head -n 1)"
167 fi
168
169 # Still no test found based on preference or blacklist, just run with one.
170 # Exclude *git* (deploy-from-source) amulet test definitions.
171 if [[ -z "$AMULET_TEST_NAME" ]]; then
172 export AMULET_TEST_NAME="$(echo "$AMULET_TESTS_ALL" | grep -v git | head -n 1)"
173 fi
174
175 # Fail and bail if none found.
176 if [[ -z "$AMULET_TEST_NAME" ]]; then
177 echo " ! NO TEST FOUND - Unable to determine which amulet test to run from $CO_DIR/tests"
178 ls -al $CO_DIR/tests
179 exit 1
180 fi
181
182 echo " . Available amulet tests:"
183 echo "$AMULET_TESTS_ALL"
184 echo " . Automatically selected test: $AMULET_TEST_NAME"
185}
186
187
100function f_amulet_set_odl_location() {188function f_amulet_set_odl_location() {
101 # Set ODL tarball location if not already set.189 # Set ODL tarball location if not already set.
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'
@@ -112,7 +200,6 @@
112200
113function f_openstack_set_network_env_vars() {201function f_openstack_set_network_env_vars() {
114 # Inspect the bootstrap node and set network environment variables based on that202 # Inspect the bootstrap node and set network environment variables based on that
115 dpkg-query --show ipcalc || sudo apt-get install ipcalc
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)"
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 }')"
118205
@@ -184,7 +271,6 @@
184 # Predictively set network environment variables before deployment exists271 # Predictively set network environment variables before deployment exists
185 f_novarc_undercloud272 f_novarc_undercloud
186273
187 dpkg-query --show ipcalc || sudo apt-get install ipcalc
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)"
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 }')"
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 }')"
@@ -256,6 +342,12 @@
256 echo " ! Configure failed."342 echo " ! Configure failed."
257 touch $WORKSPACE/fyi-${test:0:4}.configure.failed343 touch $WORKSPACE/fyi-${test:0:4}.configure.failed
258 fi344 fi
345
346 # Heat requires an action for Kilo and later to enable authorization
347 if [[ "$OPENSTACK_RELEASE" != *icehouse* ]]; then
348 echo " . Running domain-setup action on heat/0..."
349 juju action do --format=json heat/0 domain-setup
350 fi
259}351}
260352
261353
@@ -275,7 +367,6 @@
275367
276368
277function f_openstack_tempest_venv() {369function f_openstack_tempest_venv() {
278 sudo apt-get install python-virtualenv libffi-dev libssl-dev -y
279 cd $OPENSTACK_CHARM_TESTING_ROOT/tempest370 cd $OPENSTACK_CHARM_TESTING_ROOT/tempest
280 virtualenv .venv371 virtualenv .venv
281 .venv/bin/pip install -r requirements.txt372 .venv/bin/pip install -r requirements.txt
@@ -411,6 +502,12 @@
411}502}
412503
413504
505function f_novarc_artifactcloud() {
506 echo " . Sourcing artifactcloud novarc."
507 . ~/novarc-artifactcloud
508}
509
510
414function f_flavor_shrink() {511function f_flavor_shrink() {
415# Shrink flavors for smaller/faster testing512# Shrink flavors for smaller/faster testing
416 echo " + Shrinking flavors."513 echo " + Shrinking flavors."
417514
=== modified file 'job-parts/osci_osi_common.sh'
--- job-parts/osci_osi_common.sh 2016-03-04 05:37:48 +0000
+++ job-parts/osci_osi_common.sh 2016-05-18 11:59:22 +0000
@@ -35,21 +35,6 @@
35}35}
3636
3737
38function f_osi_install() {
39# Install or upgrade openstack-installer
40 echo " + Installing or upgrading openstack-installer..."
41 sudo add-apt-repository ppa:cloud-installer/experimental -y &> /dev/null || true
42 sudo apt-get update -y &> /dev/null || true
43 sudo apt-get install openstack -y || true
44 if [ -z "$(apt-cache policy openstack | grep 'Installed:')" ]; then
45 echo " ! openstack-installer install failed."
46 exit 1
47 fi
48 echo " . openstack-install version:"
49 openstack-install --version
50}
51
52
53function f_osi_config_file_pull_and_sanitize() {38function f_osi_config_file_pull_and_sanitize() {
54# Pull openstack-installer config yaml to workspace (sanitize keys and passwords)39# Pull openstack-installer config yaml to workspace (sanitize keys and passwords)
55 DEST_FILE="$WORKSPACE/osi-config.yaml"40 DEST_FILE="$WORKSPACE/osi-config.yaml"
@@ -263,7 +248,6 @@
263 "multi"|"single"|"autopilot")248 "multi"|"single"|"autopilot")
264 echo " . Starting OSI built-in ${OSI_MODE} mode test..."249 echo " . Starting OSI built-in ${OSI_MODE} mode test..."
265 f_osi_refresh250 f_osi_refresh
266 dpkg-query --show python3-pytest || sudo apt-get install python3-pytest -y
267 cd $OSI_ROOT/integration251 cd $OSI_ROOT/integration
268 py.test-3 tests/test_${OSI_MODE}.py |& tee $WORKSPACE/osi-test-${OSI_MODE}.txt252 py.test-3 tests/test_${OSI_MODE}.py |& tee $WORKSPACE/osi-test-${OSI_MODE}.txt
269 ret_code=${PIPESTATUS[0]}253 ret_code=${PIPESTATUS[0]}
270254
=== modified file 'job-parts/osci_tools_common.sh'
--- job-parts/osci_tools_common.sh 2016-03-09 19:26:45 +0000
+++ job-parts/osci_tools_common.sh 2016-05-18 11:59:22 +0000
@@ -46,8 +46,6 @@
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"
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"
4848
49 dpkg-query --show bzr-fastimport || sudo apt-get install bzr-fastimport -y
50
51 if [[ -d $MIG_TOOLS_ROOT ]]; then49 if [[ -d $MIG_TOOLS_ROOT ]]; then
52 echo " - Removing existing dir @ $MIG_TOOLS_ROOT"50 echo " - Removing existing dir @ $MIG_TOOLS_ROOT"
53 rm -rf $MIG_TOOLS_ROOT51 rm -rf $MIG_TOOLS_ROOT

Subscribers

People subscribed via source and target branches