Skip to content

Commit

Permalink
Prepare guide for "depoy on PWS" feature
Browse files Browse the repository at this point in the history
* push app artifact on S3 in CI script
* add a metadata file "run-on-pws.json" for the deploy agent
to read the app configuration from
  • Loading branch information
bclozel committed Dec 17, 2015
1 parent 3df6963 commit 49ca5a4
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 15 deletions.
33 changes: 33 additions & 0 deletions run-on-pws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"orgName": "spring-guides",
"orgUuid": "",
"spaces": [
{
"name": "spring-guides",
"routes": [
{
"name": "random1",
"value": "${random-word}"
}
],
"apps": [
{
"name": "rest-service",
"code": {
"url": "https://springio-guides.s3.amazonaws.com/gs-rest-service-0.1.0.jar",
"content_type": "application/war",
"actions": [
"push"
]
},
"instances": 1,
"memory_in_mb": 1024,
"disk_in_mb": 1024,
"map_routes": [
"random1"
]
}
]
}
]
}
38 changes: 23 additions & 15 deletions test/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
cd $(dirname $0)
cd ../initial

mvn clean compile
ret=$?
if [ $ret -ne 0 ]; then
exit $ret
fi
rm -rf target

./gradlew compileJava
ret=$?
if [ $ret -ne 0 ]; then
exit $ret
fi
rm -rf build

cd ../complete
mvn clean package
java -jar target/gs-rest-service-0.1.0.jar &
Expand All @@ -19,29 +35,21 @@ if diff -w ../test/expected.json target/actual.json
let ret=255
exit $ret
fi
rm -rf target

./gradlew build
ret=$?
if [ $ret -ne 0 ]; then
exit $ret
if [ "${TRAVIS_PULL_REQUEST}" = "false" ];
then
curl https://raw.githubusercontent.com/timkay/aws/master/aws -o aws
chmod u+x aws
./aws put --progress "x-amz-acl: public-read" springio-guides/gs-rest-service-0.1.0.jar target/gs-rest-service-0.1.0.jar
fi
rm -rf build

cd ../initial

mvn clean compile
ret=$?
if [ $ret -ne 0 ]; then
exit $ret
fi
rm -rf target

./gradlew compileJava
./gradlew build
ret=$?
if [ $ret -ne 0 ]; then
exit $ret
fi
rm -rf build

rm -rf build
exit

0 comments on commit 49ca5a4

Please sign in to comment.