Merge lp:~daniel-thewatkins/vmbuilder/jenkins_kvm-vagrantcloud into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Dan Watkins on 2017-06-28
Status: Merged
Merged at revision: 787
Proposed branch: lp:~daniel-thewatkins/vmbuilder/jenkins_kvm-vagrantcloud
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 43 lines (+5/-5)
1 file modified
register-vagrant-version.sh (+5/-5)
To merge this branch: bzr merge lp:~daniel-thewatkins/vmbuilder/jenkins_kvm-vagrantcloud
Reviewer Review Type Date Requested Status
Francis Ginther 2017-06-28 Approve on 2017-06-29
Robert C Jennings 2017-06-28 Approve on 2017-06-28
Review via email: mp+326462@code.launchpad.net
To post a comment you must log in.
Robert C Jennings (rcj) wrote :

+1

review: Approve
Francis Ginther (fginther) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'register-vagrant-version.sh'
2--- register-vagrant-version.sh 2016-03-23 09:14:35 +0000
3+++ register-vagrant-version.sh 2017-06-28 19:27:56 +0000
4@@ -2,7 +2,7 @@
5
6 set -eu
7
8-API_ROOT="https://atlas.hashicorp.com/api/v1"
9+API_ROOT="https://vagrantcloud.com/api/v1"
10 BOX_OWNER=${BOX_OWNER:-"ubuntu"}
11
12 SUITE="$1"
13@@ -14,7 +14,7 @@
14 # Always point to the current image, so we don't run in to a problem with
15 # versions being removed in the future
16 case $SUITE in
17- precise|trusty|wily)
18+ trusty)
19 BOX_URL_PREFIX="http://cloud-images.ubuntu.com/vagrant/${SUITE}/current/${SUITE}-server-cloudimg-${ARCH}"
20 BOX_URL_POSTFIX="-vagrant-disk1.box"
21 ;;
22@@ -56,10 +56,10 @@
23
24 make_api_call () {
25 echo "Making API call:" $@
26- curl -f $@ -d "access_token=${ACCESS_TOKEN}" | python -m json.tool
27+ curl -L -f $@ -d "access_token=${ACCESS_TOKEN}" | python -m json.tool
28 }
29
30-if curl -f "${API_ROOT}/box/${BOX_OWNER}/${BOX_NAME}"; then
31+if curl -L -f "${API_ROOT}/box/${BOX_OWNER}/${BOX_NAME}"; then
32 echo "Box ${BOX_NAME} already registered..."
33 else
34 echo "Registering ${BOX_NAME}..."
35@@ -76,7 +76,7 @@
36
37 echo "Check if the version already registered..."
38 while true; do
39- if curl -f "${API_ROOT}/box/${BOX_OWNER}/${BOX_NAME}/version/${VERSION}"; then
40+ if curl -L -f "${API_ROOT}/box/${BOX_OWNER}/${BOX_NAME}/version/${VERSION}"; then
41 echo "Version ${VERSION} already registered; trying a higher revision."
42 VERSION="$(echo "$VERSION" | awk -F. -v OFS=. '{printf("%s.%s.%s\n", $1, $2, ++$3)}')"
43 else

Subscribers

People subscribed via source and target branches