Skip to content

Commit ce881eb

Browse files
committed
Merge branch 'chore/docs' of https://github.com/bcgov/quickstart-aws-containers into chore/docs
2 parents 7ef019a + 709fa93 commit ce881eb

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/scripts/pause.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,26 @@
22
# This script pauses AWS resources (ECS service and RDS Aurora cluster) in the current AWS account.
33

44
set -e # Exit on error
5-
trap 'echo "Error occurred at line $LINENO while executing function $FUNCNAME"' ERR
5+
6+
# Error handler function
7+
function error_handler() {
8+
local script_name=$(basename "$0")
9+
echo "Error in script: $script_name"
10+
echo "Error occurred at line $LINENO in function ${FUNCNAME[1]}"
11+
exit 1
12+
}
13+
14+
trap 'error_handler' ERR
615
# Parse arguments
716
ENVIRONMENT=${1}
817
STACK_PREFIX=${2}
918

1019
# Validate required arguments
1120
function validate_args() {
21+
if [ -z "$ENVIRONMENT" ]; then
22+
echo "Error: Environment is required as the first parameter"
23+
exit 1
24+
fi
1225
if [ -z "$STACK_PREFIX" ]; then
1326
echo "Error: Stack prefix is required as the second parameter"
1427
exit 1

.github/workflows/.tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
steps:
8181
- uses: actions/checkout@v4
8282
- name: Run Trivy vulnerability scanner in repo mode
83-
uses: aquasecurity/trivy-action@6c175e9c4083a92bbca2f9724c8a5e33bc2d97a5 # 0.30.0
83+
uses: aquasecurity/trivy-action@76071ef0d7ec797419534a183b498b4d6366cf37 # 0.31.0
8484
with:
8585
format: "sarif"
8686
output: "trivy-results.sarif"

0 commit comments

Comments
 (0)