Skip to content

Commit f42b510

Browse files
authored
Add CI to validate required files (#665)
* add file validation * remove basic pubsub * remove exec.mainClass * rename link file * add more docs
1 parent 020a802 commit f42b510

File tree

9 files changed

+44
-763
lines changed

9 files changed

+44
-763
lines changed
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

documents/FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
### Where should I start?
1818

19-
If you are just getting started make sure you [install this sdk](https://github.com/aws/aws-iot-device-sdk-java-v2#installation) and then build and run the [basic PubSub](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples#pubsub)
19+
If you are just getting started make sure you [install this sdk](https://github.com/aws/aws-iot-device-sdk-java-v2#installation) and then build and run the [Mqtt5 X509 Sample](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples/Mqtt/Mqtt5X509)
2020

2121
### How do I enable logging?
2222

@@ -34,7 +34,7 @@ To enable logging in the samples, you will need to set the following system prop
3434
* `aws.crt.log.level`: The level of logging shown. Can be `Trace`, `Debug`, `Info`, `Warn`, `Error`, `Fatal`, or `None`. Defaults to `Warn`.
3535
* `aws.crt.log.filename`: The path to save the log file. Only needed if `aws.crt.log.destination` is set to `File`.
3636

37-
For example, to run `BasicPubSub` with logging you could use the following:
37+
For example, to run `Mqtt X509` with logging you could use the following:
3838

3939
```sh
4040
mvn compile exec:java -pl samples/Mqtt/Mqtt5X509 -Daws.crt.debugnative=true -Daws.crt.log.level=Debug -Daws.crt.log.destination=Stdout -Dexec.args='--endpoint <endpoint> --cert <path to cert> --key <path to key>'

documents/MIGRATION_GUIDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,8 +905,8 @@ samples.
905905
### Example
906906

907907
It's always helpful to look at a working example to see how new functionality works, to be able to tweak different options,
908-
to compare with existing code. For that reason, we implemented a [Publish/Subscribe example](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples/Mqtt5/PubSub)
909-
([source code](https://github.com/aws/aws-iot-device-sdk-java-v2/blob/main/samples/Mqtt5/PubSub/src/main/java/pubsub/PubSub.java))
908+
to compare with existing code. For that reason, we implemented a [Publish/Subscribe example](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples/Mqtt/Mqtt5X509)
909+
([source code](https://github.com/aws/aws-iot-device-sdk-java-v2/blob/main/samples/Mqtt/Mqtt5X509/src/main/java/mqtt5x509/Mqtt5X509.java))
910910
in the V2 SDK similar to a sample provided by V1 SDK (see a corresponding [readme section](https://github.com/aws/aws-iot-device-sdk-java/tree/master?tab=readme-ov-file#sample-applications)
911911
and [source code](https://github.com/aws/aws-iot-device-sdk-java/blob/master/aws-iot-device-sdk-java-samples/src/main/java/com/amazonaws/services/iot/client/sample/pubSub/PublishSubscribeSample.java)).
912912

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
<modules>
1010
<module>sdk</module>
11-
<module>samples/BasicPubSub</module>
1211
<module>samples/Mqtt/Mqtt5X509</module>
1312
<module>samples/Mqtt/Mqtt5AwsWebsocket</module>
1413
<module>samples/Mqtt/Mqtt5CustomAuthSigned</module>

samples/BasicPubSub/README.md

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

samples/BasicPubSub/pom.xml

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

0 commit comments

Comments
 (0)