Merge lp:~aurelien-lourot/ubuntu-openstack-ci/func-test-pr into lp:ubuntu-openstack-ci

Proposed by Aurelien Lourot
Status: Merged
Approved by: Chris MacNaughton
Approved revision: 440
Merged at revision: 439
Proposed branch: lp:~aurelien-lourot/ubuntu-openstack-ci/func-test-pr
Merge into: lp:ubuntu-openstack-ci
Diff against target: 24 lines (+11/-1)
1 file modified
run/job-parts/osci_openstack_common.sh (+11/-1)
To merge this branch: bzr merge lp:~aurelien-lourot/ubuntu-openstack-ci/func-test-pr
Reviewer Review Type Date Requested Status
Chris MacNaughton (community) Approve
Dmitrii Shcherbakov (community) Approve
Review via email: mp+390013@code.launchpad.net

Commit message

Support func-test-pr branch names with several slashes

Also add traces around func-test-pr parsing

To post a comment you must log in.
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

Looks good.

The backward slashes are needed in f_openstack_update_zaza_test_requirements when another `sed` is performed.

review: Approve
Revision history for this message
Chris MacNaughton (chris.macnaughton) :
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/osci_openstack_common.sh'
2--- run/job-parts/osci_openstack_common.sh 2020-06-24 09:29:18 +0000
3+++ run/job-parts/osci_openstack_common.sh 2020-08-31 10:22:42 +0000
4@@ -194,11 +194,21 @@
5 _github_api_pr_url="https://api.github.com/repos/$_pr_repo/pulls/$_pr_num"
6 _pr_label=$(curl $_github_api_pr_url | \
7 awk '/"head":/ {getline; gsub(/"|,/, ""); print $2}')
8+ echo " + Parsing/fetching func-test-pr info:"
9+ echo " _pr_repo: $_pr_repo"
10+ echo " _pr_num: $_pr_num"
11+ echo " _github_api_pr_url: $_github_api_pr_url"
12+ echo " _pr_label: $_pr_label"
13 export GITHUB_PR_REPO=$(echo $_pr_repo | cut -f2 -d/)
14 export GITHUB_PR_ORG=$(echo $_pr_repo | cut -f1 -d/)
15 export GITHUB_PR_LOGIN=$(echo $_pr_label | cut -f1 -d:)
16 export GITHUB_PR_BRANCH=$(echo $_pr_label | cut -f2 -d: | \
17- sed -e 's/\//\\\//')
18+ sed -e 's/\//\\\//g')
19+ echo " + Setting func-test-pr env vars:"
20+ echo " GITHUB_PR_REPO: $GITHUB_PR_REPO"
21+ echo " GITHUB_PR_ORG: $GITHUB_PR_ORG"
22+ echo " GITHUB_PR_LOGIN: $GITHUB_PR_LOGIN"
23+ echo " GITHUB_PR_BRANCH: $GITHUB_PR_BRANCH"
24 }
25
26

Subscribers

People subscribed via source and target branches