-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add last minute changes to create script
- Loading branch information
Alex Forbes
committed
Feb 8, 2016
1 parent
6cbebe3
commit 1fb8024
Showing
2 changed files
with
55 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,34 @@ | ||
#!/bin/bash | ||
PORT=5000 | ||
auth_token=$(curl -s -X GET http://localhost:${PORT}/token --user alforbes:moreblabla | json_pp | grep token | cut -d '"' -f 4) | ||
echo auth_token | ||
ril=$(curl -s -H "X-Auth-Token: $auth_token" -H "Content-Type: application/json" -X POST "http://127.0.0.1:${PORT}/releases" -d @./releases.json | grep 'id' | cut -d '"' -f 4) | ||
echo $ril | ||
curl -s -H "X-Auth-Token: $auth_token" -H "Content-Type: application/json" -X POST "http://127.0.0.1:${PORT}/releases/${ril}/packages" -d @./package.json | ||
|
||
echo "Relase created: ${ril}" | ||
PORT=8080 | ||
|
||
clear | ||
echo -e "Get auth token" | ||
auth_token=$(curl -s -X GET http://localhost:${PORT}/token --user alforbes:moreblabla | json_pp | grep token | cut -d '"' -f 4) &>/dev/null | ||
curl -vs -X GET http://localhost:${PORT}/token --user alforbes:moreblabla | ||
echo | ||
read -n1 -p 'Press any key to continue' | ||
|
||
curl -H "X-Auth-Token: $auth_token" -v -X POST "http://127.0.0.1:${PORT}/releases/${ril}/deploy"; echo | ||
clear | ||
echo "Create release" | ||
ril=$(curl -sv -H "X-Auth-Token: $auth_token" -H "Content-Type: application/json" -X POST "http://127.0.0.1:${PORT}/releases" -d @./releases.json | grep 'id' | cut -d '"' -f 4) | ||
echo -e "Created release ${ril}\n\n" | ||
read -n1 -p 'Press any key to continue' | ||
|
||
|
||
clear | ||
echo "Create package" | ||
curl -sv -H "X-Auth-Token: $auth_token" -H "Content-Type: application/json" -X POST "http://127.0.0.1:${PORT}/releases/${ril}/packages" -d @./package.json | ||
echo -e "Created package\n\n" | ||
read -n1 -p 'Press any key to continue' | ||
|
||
|
||
clear | ||
echo "Start deploy" | ||
curl -svH "X-Auth-Token: $auth_token" -v -X POST "http://127.0.0.1:${PORT}/releases/${ril}/deploy"; echo -e | ||
|
||
|
||
read -n1 -p 'Press any key to continue' | ||
clear | ||
curl -svH "X-Auth-Token: $auth_token" -v -X GET "http://127.0.0.1:${PORT}/releases/${ril}" | jq .; echo -e | ||
echo -e "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
{ | ||
"platforms": [ "GumtreeUK" ], | ||
"stime": "2015-12-17T17:02:04Z", | ||
"ftime": "2015-12-17T17:02:24Z", | ||
"team": "Gumtree UK Site Operations", | ||
"metadata" : {"env" : "test", "pool" : "web"}, | ||
"references": [ | ||
"TICKET-1" | ||
], | ||
"notes": [ | ||
"Imported from other_system" | ||
], | ||
"packages": [ | ||
{ | ||
"name": "", | ||
"diff_url": null, | ||
"stime": "2015-12-17T17:02:22Z", | ||
"ftime": 1450371742, | ||
"rollback": false, | ||
"status": "SUCCESSFUL", | ||
"version": "1.0.1" | ||
} | ||
], | ||
"user": "user_one" | ||
} | ||
{ | ||
"platforms": ["GumtreeUK"], | ||
"stime": "2015-12-17T17:02:04Z", | ||
"ftime": "2015-12-17T17:02:24Z", | ||
"team": "Gumtree UK Site Operations", | ||
"metadata" : {"env" : "test", "pool" : "web"}, | ||
"references": [ | ||
"TICKET-1" | ||
], | ||
"notes": [ | ||
"Imported from other_system" | ||
], | ||
"packages": [ | ||
{ | ||
"name": "", | ||
"diff_url": null, | ||
"stime": "2015-12-17T17:02:22Z", | ||
"ftime": 1450371742, | ||
"rollback": false, | ||
"status": "SUCCESSFUL", | ||
"version": "1.0.1" | ||
} | ||
], | ||
"user": "user_one" | ||
} |