Skip to content

Commit b7d9121

Browse files
authored
Add CI to validate required files (#578)
* wip add ci file validation * update file path * add aback pub sub electron node * remove outdated note * remove utils and pubsub sample * fix compile service tests * fix builder * add back comments * clean up fleet provisioning * rename the doc file * add gg sample file as required
1 parent 4234388 commit b7d9121

18 files changed

Lines changed: 335 additions & 1700 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Main Branch Checks
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches-ignore:
8+
- 'main'
9+
- 'docs'
10+
11+
jobs:
12+
verify-documentation-links:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Verify documentation files and links
17+
# check if the files exists in the repository. The file list is in utils/doc-links.txt.
18+
run: |
19+
missing=0
20+
while read -r file || [ -n "$file" ]; do
21+
if [ ! -f "$file" ]; then
22+
if [ $missing -eq 0 ]; then
23+
echo "❌ Missing files referenced in AWS documentation:"
24+
missing=$((missing + 1))
25+
fi
26+
echo " - $file"
27+
fi
28+
done < utils/ci-aws-doc-links.txt
29+
30+
if [ $missing -ge 1 ]; then
31+
echo "Instructions:"
32+
echo " The above files are required for AWS services or documentations."
33+
echo " Restore missing files or update documentation before merge."
34+
echo " Refer to team wiki "AWS Service and Documentation Links" for details. "
35+
exit 1
36+
else
37+
echo "✅ All documentation-referenced files exist"
38+
fi

codebuild/cd/test-publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ if [ "$PUBLISHED_TAG_VERSION" == "$VERSION" ]; then
4242
npm install
4343

4444
# Move to the sample folder and get the endpoint
45-
cd samples/node/pub_sub
45+
cd samples/node/mqtt/mqtt5_x509
4646
ENDPOINT=$(aws secretsmanager get-secret-value --secret-id "ci/endpoint" --region us-east-1 --query "SecretString" | cut -f2 -d":" | sed -e 's/[\\\"\}]//g')
4747

4848
# Run the sample!
4949
npm install
50-
node dist/index.js --endpoint $ENDPOINT --ca_file /tmp/AmazonRootCA1.pem --cert /tmp/certificate.pem --key /tmp/privatekey.pem
50+
node dist/index.js --endpoint $ENDPOINT --cert /tmp/certificate.pem --key /tmp/privatekey.pem
5151

5252
exit 0
5353

documents/FAQ.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
### Where should I start?
1616

17-
If you are just getting started make sure you [install this sdk](https://github.com/aws/aws-iot-device-sdk-js-v2#installation) and then build and run the basic PubSub in [node](https://github.com/aws/aws-iot-device-sdk-js-v2/tree/main/samples/node/pub_sub_mqtt5) or in the [browser](https://github.com/aws/aws-iot-device-sdk-js-v2/tree/main/samples/browser/pub_sub_mqtt5)
17+
If you are just getting started make sure you [install this sdk](https://github.com/aws/aws-iot-device-sdk-js-v2#installation) and then build and run the basic PubSub in [node](https://github.com/aws/aws-iot-device-sdk-js-v2/tree/main/samples/node/mqtt/mqtt5_x509) or in the [browser](https://github.com/aws/aws-iot-device-sdk-js-v2/tree/main/samples/browser/pub_sub_mqtt5)
1818

1919
### How do I enable logging?
2020

@@ -72,14 +72,13 @@ Here is an example launch.json file to run the pubsub sample
7272
{
7373
"type": "node",
7474
"request": "launch",
75-
"name": "pub_sub",
75+
"name": "mqtt5_x509",
7676
"skipFiles": [
7777
"<node_internals>/**"
7878
],
79-
"program": "${workspaceFolder}/samples/node/pub_sub/dist/index.js",
79+
"program": "${workspaceFolder}/samples/node/mqtt/mqtt5_x509/dist/index.js",
8080
"args": [
8181
"--endpoint", "<account-number>-ats.iot.<region>.amazonaws.com",
82-
"--ca_file", "<path to root-CA>",
8382
"--cert", "<path to cert>",
8483
"--key", "<path to key>",
8584
"--client-id", "test-client"

samples/node/pub_sub/README.md

Lines changed: 0 additions & 285 deletions
This file was deleted.

0 commit comments

Comments
 (0)