Includes an end-to-end CI/CD workflow on GitHub Actions to test for AWS Lambda deployment.
This workflow is triggered only upon push to the main branch, or manually from the Actions tab.
Implementation Notes :hammer_and_pick:
As workflow is triggered only upon commit to main branch, PRs will not capture any failure in AWS end-to-end deployments before merging
Currently, workflow trigger is disabled on pull_request as secrets are not accessible from forked repository
As the code for AWS deployment is rather localised, the above workflow trigger setting will minimise any disruptions to developers
If required, developers can manually trigger the workflow under the Actions tab
The required secrets (AWS credentials) will be verified prior to running the workflow
If missing / not set, workflow will fail as early as possible
To maintain cloud deployment isolation, we need to ensure a limit of 1 concurrent cloud deployment
This is achieved using a 3rd party GitHub Action in the marketplace which:
Checks for any existing same-named workflows
Enqueues the new request if the above workflows are detected
Poll for their turn periodically and maintain execution order/sequence for each enqueued workflow (polling interval specified at 1 minute; for up to 60 minutes)
To minimise queue time (esp. during peak periods) and compute duration, we reduced the experiment duration of AWS deployment from 5 minutes to 5 seconds by using pkg/config/test_config_aws.json
Note: We had to adopt an external dependency as the in-built GitHub option for concurrency at the job/workflow level does not provide the desired behaviour. With only a queue length of 1, when multiple workflows get queued, at most the current workflow in execution and the latest-queued workflow will be kept. All other workflows would be cancelled. (Read more here or understand through an example).
Summary
Includes an end-to-end CI/CD workflow on GitHub Actions to test for AWS Lambda deployment.
This workflow is triggered only upon
push
to themain
branch, or manually from theActions
tab.Implementation Notes :hammer_and_pick:
main
branch, PRs will not capture any failure in AWS end-to-end deployments before mergingpull_request
as secrets are not accessible from forked repositoryActions
tabpkg/config/test_config_aws.json
Note: We had to adopt an external dependency as the in-built GitHub option for concurrency at the job/workflow level does not provide the desired behaviour. With only a queue length of 1, when multiple workflows get queued, at most the current workflow in execution and the latest-queued workflow will be kept. All other workflows would be cancelled. (Read more here or understand through an example).
External Dependencies :four_leaf_clover:
Breaking API Changes :warning: