Merge lp:~1chb1n/ubuntu-openstack-ci/charm-what-bundle-func into lp:ubuntu-openstack-ci

Proposed by Ryan Beisner
Status: Merged
Merged at revision: 412
Proposed branch: lp:~1chb1n/ubuntu-openstack-ci/charm-what-bundle-func
Merge into: lp:ubuntu-openstack-ci
Diff against target: 96 lines (+27/-7)
3 files modified
run/job-parts/build_func_test.sh (+5/-3)
run/job-parts/osci_job_common.sh (+8/-0)
run/job-parts/osci_layerci_common.sh (+14/-4)
To merge this branch: bzr merge lp:~1chb1n/ubuntu-openstack-ci/charm-what-bundle-func
Reviewer Review Type Date Requested Status
Chris MacNaughton (community) Approve
Review via email: mp+361007@code.launchpad.net

Commit message

Update asset type checking for zaza func bundle style

Description of the change

Update asset type checking for zaza func bundle style

To post a comment you must log in.
413. By Ryan Beisner

Require BASE_NAME when setting CO_DIR

414. By Ryan Beisner

Rebase this branch with trunk

415. By Ryan Beisner

Update asset type check for zaza bundle approach

416. By Ryan Beisner

Debug CO_DIR TEST_PATH BUILT_ASSET DIR env vars

417. By Ryan Beisner

Add osci repo info to console output for clarity

418. By Ryan Beisner

Clean up

419. By Ryan Beisner

Update known asset type filter

420. By Ryan Beisner

Additional update to type filter

421. By Ryan Beisner

Clean up

Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'run/job-parts/build_func_test.sh'
2--- run/job-parts/build_func_test.sh 2018-12-14 07:57:29 +0000
3+++ run/job-parts/build_func_test.sh 2018-12-17 18:33:29 +0000
4@@ -17,10 +17,12 @@
5
6 f_line "Begin functional test"
7 f_env_set_network_env_vars
8-cd ${BUILT_ASSET_DIR-$CO_DIR}
9
10-if [[ -n $TEST_PATH ]]; then
11- cd $TEST_PATH
12+if [[ -n "$CO_DIR" ]] && [[ -n "$TEST_PATH" ]]; then
13+ # openstack-bundles style zaza test
14+ cd ${CO_DIR}/${TEST_PATH}
15+else
16+ cd ${BUILT_ASSET_DIR-$CO_DIR}
17 fi
18
19 : ${TOX_SEARCH:="func27|func"}
20
21=== modified file 'run/job-parts/osci_job_common.sh'
22--- run/job-parts/osci_job_common.sh 2018-12-13 20:55:35 +0000
23+++ run/job-parts/osci_job_common.sh 2018-12-17 18:33:29 +0000
24@@ -275,6 +275,12 @@
25 function f_set_co_dir() {
26 # Set the checkout dir
27 mkdir -p $JENKINS_HOME/checkout/$EXECUTOR_NUMBER
28+
29+ if [[ -z "$BASE_NAME" ]]; then
30+ echo " ! Missing BASE_NAME, cannot set CO_DIR"
31+ exit 1
32+ fi
33+
34 export CO_DIR=$JENKINS_HOME/checkout/$EXECUTOR_NUMBER/$BASE_NAME
35 }
36
37@@ -491,6 +497,8 @@
38 export SKIP_JUJU_FOO="true"
39 }
40
41+f_line "OSCI_ROOT repo info"
42+bzr info ${OSCI_ROOT}
43
44 # Charm store timeout value, consumed by libcharmstore
45 export CS_API_TIMEOUT=60
46
47=== modified file 'run/job-parts/osci_layerci_common.sh'
48--- run/job-parts/osci_layerci_common.sh 2018-08-09 12:13:38 +0000
49+++ run/job-parts/osci_layerci_common.sh 2018-12-17 18:33:29 +0000
50@@ -213,6 +213,10 @@
51 # Change nothing at this time
52 echo " . Proceeding with $CO_DIR as an interface [no build necessary]"
53 ;;
54+ "bundle (func)")
55+ # A zaza-testable bundle, ie. from openstack-bundle
56+ echo " . Proceeding with $CO_DIR as a testable bundle"
57+ ;;
58 *)
59 echo " ! Unknown asset type"
60 exit 1
61@@ -229,7 +233,7 @@
62
63 f_layerci_check_and_announce_asset_type
64 case "$OSCI_ASSET_TYPE" in
65- "charm (built)"|"charm (classic)")
66+ "charm (built)"|"charm (classic)"|"bundle (func)")
67 # OK
68 :
69 ;;
70@@ -250,7 +254,7 @@
71 function f_layerci_build_if_necessary() {
72 f_layerci_check_and_announce_asset_type
73 case "$OSCI_ASSET_TYPE" in
74- "charm (built)"|"charm (classic)")
75+ "charm (built)"|"charm (classic)"|"bundle (func)")
76 # OK
77 :
78 ;;
79@@ -268,9 +272,15 @@
80
81 function f_layerci_check_and_announce_asset_type() {
82 # Check (or re-check) and announce asset type via charm-what.
83- f_layerci_get_asset_type ${BUILT_ASSET_DIR-$CO_DIR}
84+
85+ if [[ -n "$CO_DIR" ]] && [[ -n "$TEST_PATH" ]]; then
86+ f_layerci_get_asset_type ${CO_DIR}/${TEST_PATH}
87+ else
88+ f_layerci_get_asset_type ${BUILT_ASSET_DIR-$CO_DIR}
89+ fi
90+
91 case "$OSCI_ASSET_TYPE" in
92- "charm (built)"|"charm (classic)"|"charm (source)"|"layer"|"interface")
93+ "charm (built)"|"charm (classic)"|"charm (source)"|"layer"|"interface"|"bundle (func)")
94 # OK
95 :
96 ;;

Subscribers

People subscribed via source and target branches