File tree Expand file tree Collapse file tree 6 files changed +79
-5
lines changed Expand file tree Collapse file tree 6 files changed +79
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
set -e
4
+ set -o pipefail
4
5
5
6
env
6
7
7
8
pushd $CODEBUILD_SRC_DIR /samples/node/basic_connect
8
9
9
- ENDPOINT=$( aws secretsmanager get-secret-value --secret-id " unit-test /endpoint" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
10
+ ENDPOINT=$( aws secretsmanager get-secret-value --secret-id " ci /endpoint" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
10
11
11
12
npm install --unsafe-perm
12
13
13
14
echo " Connect Basic (Direct) test"
14
- node dist/index.js --endpoint $ENDPOINT --key /tmp/privatekey.pem --cert /tmp/certificate.pem
15
+ node dist/index.js --endpoint $ENDPOINT --key /tmp/privatekey.pem --cert /tmp/certificate.pem --is_ci true
15
16
16
17
popd
17
18
@@ -20,6 +21,6 @@ pushd $CODEBUILD_SRC_DIR/samples/node/websocket_connect
20
21
npm install --unsafe-perm
21
22
22
23
echo " Connect Websocket test"
23
- node dist/index.js --endpoint $ENDPOINT --signing_region us-east-1
24
+ node dist/index.js --endpoint $ENDPOINT --signing_region us-east-1 --is_ci true
24
25
25
26
popd
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ set -o pipefail
5
+
6
+ env
7
+
8
+ pushd $CODEBUILD_SRC_DIR /samples/node/custom_authorizer_connect
9
+
10
+ ENDPOINT=$( aws secretsmanager get-secret-value --secret-id " ci/endpoint" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
11
+ AUTH_NAME=$( aws secretsmanager get-secret-value --secret-id " ci/CustomAuthorizer/name" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
12
+ AUTH_PASSWORD=$( aws secretsmanager get-secret-value --secret-id " ci/CustomAuthorizer/password" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
13
+
14
+ npm install --unsafe-perm
15
+
16
+ echo " Mqtt Connect with Custom Authorizer test"
17
+ node dist/index.js --endpoint $ENDPOINT --custom_auth_authorizer_name $AUTH_NAME --custom_auth_password $AUTH_PASSWORD --is_ci true
18
+
19
+ popd
Original file line number Diff line number Diff line change
1
+ # Assumes are running using the Ubuntu Codebuild standard image
2
+ # NOTE: This script assumes that the AWS CLI-V2 is pre-installed!
3
+ # - AWS CLI-V2 is a requirement to run this script.
1
4
version : 0.2
2
5
phases :
3
6
install :
4
7
commands :
5
8
- add-apt-repository ppa:ubuntu-toolchain-r/test
6
9
- apt-get update -y
10
+ - echo "\nBuild version data:"
11
+ - echo "\nNode Version:"; node --version
12
+ - echo "\nNPM Version:"; npm --version
13
+ - echo "\n"
7
14
build :
8
15
commands :
9
16
- echo Build started on `date`
10
17
- $CODEBUILD_SRC_DIR/codebuild/samples/setup-linux.sh
11
18
- $CODEBUILD_SRC_DIR/codebuild/samples/connect-linux.sh
19
+ - $CODEBUILD_SRC_DIR/codebuild/samples/custom-auth-linux.sh
20
+ - $CODEBUILD_SRC_DIR/codebuild/samples/pubsub-linux.sh
21
+ - $CODEBUILD_SRC_DIR/codebuild/samples/shadow-linux.sh
12
22
post_build :
13
23
commands :
14
24
- echo Build completed on `date`
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ set -o pipefail
5
+
6
+ env
7
+
8
+ pushd $CODEBUILD_SRC_DIR /samples/node/pub_sub
9
+
10
+ ENDPOINT=$( aws secretsmanager get-secret-value --secret-id " ci/endpoint" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
11
+
12
+ npm install --unsafe-perm
13
+
14
+ echo " PubSub test"
15
+ node dist/index.js --endpoint $ENDPOINT --key /tmp/privatekey.pem --cert /tmp/certificate.pem --is_ci true
16
+
17
+ popd
18
+
19
+ pushd $CODEBUILD_SRC_DIR /samples/node/pub_sub_js
20
+
21
+ npm install --unsafe-perm
22
+
23
+ echo " PubSub JS test"
24
+ node index.js --endpoint $ENDPOINT --key /tmp/privatekey.pem --cert /tmp/certificate.pem --is_ci true
25
+
26
+ popd
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
set -e
4
+ set -o pipefail
4
5
5
6
env
6
7
@@ -10,5 +11,5 @@ cd $CODEBUILD_SRC_DIR
10
11
ulimit -c unlimited
11
12
npm install --unsafe-perm
12
13
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
14
+ cert=$( aws secretsmanager get-secret-value --secret-id " ci/CodeBuild/cert " --query " SecretString" | cut -f2 -d" :" | cut -f2 -d\" ) && echo -e " $cert " > /tmp/certificate.pem
15
+ key=$( aws secretsmanager get-secret-value --secret-id " ci/CodeBuild/key " --query " SecretString" | cut -f2 -d" :" | cut -f2 -d\" ) && echo -e " $key " > /tmp/privatekey.pem
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ set -o pipefail
5
+
6
+ env
7
+
8
+ pushd $CODEBUILD_SRC_DIR /samples/node/shadow
9
+
10
+ ENDPOINT=$( aws secretsmanager get-secret-value --secret-id " ci/endpoint" --query " SecretString" | cut -f2 -d" :" | sed -e ' s/[\\\"\}]//g' )
11
+
12
+ npm install --unsafe-perm
13
+
14
+ echo " Shadow test"
15
+ node dist/index.js --endpoint $ENDPOINT --key /tmp/privatekey.pem --cert /tmp/certificate.pem --thing_name CI_CodeBuild_Thing --is_ci true
16
+
17
+ popd
You can’t perform that action at this time.
0 commit comments