-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
id=$(uuidgen) | ||
job_id=$(uuidgen) | ||
# Schedule tests for 10 minutes in the future to allow the network to stabilize. This assumes that the deployment is | ||
# successful with the right image being deployed, which might not always be the case if the deployment fails for some | ||
# reason. In the future, this can be done better via the CD manager, which will check for the network being ready with | ||
# the right image before scheduling tests. | ||
now=$(date +%s%N -d "10 minutes") | ||
ttl=$(date +%s -d "14 days") | ||
network=${1-dev} | ||
test_selector=${2-.} | ||
|
||
docker run --rm -i \ | ||
-e "AWS_REGION=$AWS_REGION" \ | ||
-e "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" \ | ||
-e "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" \ | ||
-v ~/.aws:/root/.aws \ | ||
-v "$PWD":/aws \ | ||
amazon/aws-cli dynamodb put-item --table-name "ceramic-$network-ops" --item \ | ||
"{ \ | ||
\"id\": {\"S\": \"$id\"}, \ | ||
\"job\": {\"S\": \"$job_id\"}, \ | ||
\"ts\": {\"N\": \"$now\"}, \ | ||
\"ttl\": {\"N\": \"$ttl\"}, \ | ||
\"stage\": {\"S\": \"queued\"}, \ | ||
\"type\": {\"S\": \"workflow\"}, \ | ||
\"params\": { \ | ||
\"M\": { \ | ||
\"name\": {\"S\": \"Post-Deployment Tests\"}, \ | ||
\"org\": {\"S\": \"3box\"}, \ | ||
\"repo\": {\"S\": \"ceramic-tests\"}, \ | ||
\"ref\": {\"S\": \"main\"}, \ | ||
\"workflow\": {\"S\": \"run-durable.yml\"}, \ | ||
\"inputs\": { \ | ||
\"M\": { \ | ||
\"test_selector\": {\"S\": \"$test_selector\"} \ | ||
} \ | ||
} \ | ||
} \ | ||
} \ | ||
}" |