File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+ phases :
3
+ install :
4
+ commands :
5
+ - add-apt-repository ppa:ubuntu-toolchain-r/test
6
+ - apt-get update -y
7
+ build :
8
+ commands :
9
+ - echo Build started on `date`
10
+ - $CODEBUILD_SRC_DIR/codebuild/samples/setup-linux.sh
11
+ - $CODEBUILD_SRC_DIR/codebuild/samples/pubsub-linux.sh
12
+ post_build :
13
+ commands :
14
+ - echo Build completed on `date`
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ env
6
+
7
+ pushd $CODEBUILD_SRC_DIR /samples/node/pub_sub
8
+
9
+ ENDPOINT=$( aws secretsmanager get-secret-value --secret-id " unit-test/endpoint" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
10
+
11
+ npm install --unsafe-perm
12
+
13
+ echo " Mqtt Direct test"
14
+ node dist/index.js --endpoint $ENDPOINT --key /tmp/privatekey.pem --cert /tmp/certificate.pem
15
+
16
+ echo " Websocket test"
17
+ node dist/index.js --endpoint $ENDPOINT --use_websocket --signing_region us-east-1
18
+
19
+ popd
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ env
6
+
7
+ # build package
8
+ cd $CODEBUILD_SRC_DIR
9
+
10
+ ulimit -c unlimited
11
+ npm install --unsafe-perm
12
+
13
+ cert=$( aws secretsmanager get-secret-value --secret-id " unit-test/certificate" --query " SecretString" | cut -f2 -d" :" | cut -f2 -d\" ) && echo -e " $cert " > /tmp/certificate.pem
14
+ key=$( aws secretsmanager get-secret-value --secret-id " unit-test/privatekey" --query " SecretString" | cut -f2 -d" :" | cut -f2 -d\" ) && echo -e " $key " > /tmp/privatekey.pem
You can’t perform that action at this time.
0 commit comments