ソースを参照

Prepare guide for "depoy on PWS" feature

* 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
Brian Clozel 9 年 前
コミット
49ca5a4d17
共有2 個のファイルを変更した56 個の追加15 個の削除を含む
  1. 33
    0
      run-on-pws.json
  2. 23
    15
      test/run.sh

+ 33
- 0
run-on-pws.json ファイルの表示

1
+{
2
+    "orgName": "spring-guides",
3
+    "orgUuid": "",
4
+    "spaces": [
5
+        {
6
+            "name": "spring-guides",
7
+            "routes": [
8
+                {
9
+                    "name": "random1",
10
+                    "value": "${random-word}"
11
+                }
12
+            ],
13
+            "apps": [
14
+                {
15
+                    "name": "rest-service",
16
+                    "code": {
17
+                        "url": "https://springio-guides.s3.amazonaws.com/gs-rest-service-0.1.0.jar",
18
+                        "content_type": "application/war",
19
+                        "actions": [
20
+                            "push"
21
+                        ]
22
+                    },
23
+                    "instances": 1,
24
+                    "memory_in_mb": 1024,
25
+                    "disk_in_mb": 1024,
26
+                    "map_routes": [
27
+                        "random1"
28
+                    ]
29
+                }
30
+            ]
31
+        }
32
+    ]
33
+}

+ 23
- 15
test/run.sh ファイルの表示

1
 cd $(dirname $0)
1
 cd $(dirname $0)
2
+cd ../initial
3
+
4
+mvn clean compile
5
+ret=$?
6
+if [ $ret -ne 0 ]; then
7
+exit $ret
8
+fi
9
+rm -rf target
10
+
11
+./gradlew compileJava
12
+ret=$?
13
+if [ $ret -ne 0 ]; then
14
+exit $ret
15
+fi
16
+rm -rf build
17
+
2
 cd ../complete
18
 cd ../complete
3
 mvn clean package
19
 mvn clean package
4
 java -jar target/gs-rest-service-0.1.0.jar &
20
 java -jar target/gs-rest-service-0.1.0.jar &
19
         let ret=255
35
         let ret=255
20
         exit $ret
36
         exit $ret
21
 fi
37
 fi
22
-rm -rf target
23
 
38
 
24
-./gradlew build
25
-ret=$?
26
-if [ $ret -ne 0 ]; then
27
-exit $ret
39
+if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; 
40
+  then 
41
+    curl https://raw.githubusercontent.com/timkay/aws/master/aws -o aws
42
+    chmod u+x aws
43
+    ./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
28
 fi
44
 fi
29
-rm -rf build
30
-
31
-cd ../initial
32
 
45
 
33
-mvn clean compile
34
-ret=$?
35
-if [ $ret -ne 0 ]; then
36
-exit $ret
37
-fi
38
 rm -rf target
46
 rm -rf target
39
 
47
 
40
-./gradlew compileJava
48
+./gradlew build
41
 ret=$?
49
 ret=$?
42
 if [ $ret -ne 0 ]; then
50
 if [ $ret -ne 0 ]; then
43
 exit $ret
51
 exit $ret
44
 fi
52
 fi
45
-rm -rf build
46
 
53
 
54
+rm -rf build
47
 exit
55
 exit