Skip to content

Commit 07fc662

Browse files
committed
Forgot to update the runner script
1 parent 2e4df68 commit 07fc662

2 files changed

Lines changed: 73 additions & 7 deletions

File tree

.github/workflows/run_notify_load.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
maxVusers:
2323
description: 'Maximum number of vusers to create'
2424
required: true
25-
default: '500'
25+
default: '10000'
2626

2727
jobs:
2828
run_artillery:
@@ -95,16 +95,16 @@ jobs:
9595
rampUpDuration: ${{ github.event.inputs.rampUpDuration }}
9696
maxVusers: ${{ github.event.inputs.maxVusers }}
9797
run: |
98-
./scripts/run_psu_load_test.sh
98+
./scripts/run_notify_load_test.sh
9999
100100
- uses: actions/upload-artifact@v4
101101
if: always()
102102
name: Upload test_report
103103
with:
104104
name: test_report
105105
path: |
106-
psu_load_test.json
107-
psu_load_test.json.html
106+
notify_load_test.json
107+
notify_load_test.json.html
108108
109109
- name: Upload artifacts to S3, if we are using REF environment
110110
if: github.event.inputs.environment == 'ref'
@@ -114,8 +114,8 @@ jobs:
114114
BUCKET_NAME: artilleryio-test-data-${{ secrets.AWS_ACCOUNT_ID }}
115115
RUN_ID: ${{ github.run_id }}
116116
run: |
117-
aws s3 cp psu_load_test.json s3://$BUCKET_NAME/reports/$RUN_ID/psu_load_test.json --acl public-read
118-
aws s3 cp psu_load_test.json.html s3://$BUCKET_NAME/reports/$RUN_ID/psu_load_test.json.html --acl public-read
117+
aws s3 cp notify_load_test.json s3://$BUCKET_NAME/reports/$RUN_ID/notify_load_test.json --acl public-read
118+
aws s3 cp notify_load_test.json.html s3://$BUCKET_NAME/reports/$RUN_ID/notify_load_test.json.html --acl public-read
119119
120120
- name: Output link to HTML report
121121
if: github.event.inputs.environment == 'ref'
@@ -124,6 +124,6 @@ jobs:
124124
BUCKET_NAME: artilleryio-test-data-${{ secrets.AWS_ACCOUNT_ID }}
125125
RUN_ID: ${{ github.run_id }}
126126
run: |
127-
REPORT_URL="https://$BUCKET_NAME.s3.${AWS_REGION}.amazonaws.com/reports/$RUN_ID/psu_load_test.json.html"
127+
REPORT_URL="https://$BUCKET_NAME.s3.${AWS_REGION}.amazonaws.com/reports/$RUN_ID/notify_load_test.json.html"
128128
echo "Test report is hosted at: $REPORT_URL" >> "$GITHUB_STEP_SUMMARY"
129129
echo "::set-output name=report_url::$REPORT_URL"

scripts/run_notify_load_test.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -z "${maxVusers}" ]; then
4+
echo "maxVusers is unset or set to the empty string"
5+
exit 1
6+
fi
7+
8+
if [ -z "${duration}" ]; then
9+
echo "duration is unset or set to the empty string"
10+
exit 1
11+
fi
12+
13+
if [ -z "${environment}" ]; then
14+
echo "environment is unset or set to the empty string"
15+
exit 1
16+
fi
17+
18+
if [ -z "${arrivalRate}" ]; then
19+
echo "arrivalRate is unset or set to the empty string"
20+
exit 1
21+
fi
22+
23+
if [ -z "${rampUpDuration}" ]; then
24+
echo "rampUpDuration is unset or set to the empty string"
25+
exit 1
26+
fi
27+
28+
if ! [[ "${environment}" =~ ^(dev|ref)$ ]]
29+
then
30+
echo "environment must be dev or ref"
31+
exit 1
32+
fi
33+
34+
security_group=$(aws cloudformation list-exports --output json | jq -r '.Exports[] | select(.Name == "artillery-resources:ArtillerySecurityGroupId") | .Value' | grep -o '[^:]*$')
35+
export security_group
36+
vpc_subnets=$(aws cloudformation list-exports --output json | jq -r '.Exports[] | select(.Name == "vpc-resources:PrivateSubnets") | .Value' | grep -o '[^:]*$')
37+
export vpc_subnets
38+
39+
artillery_worker_role_name=$(aws cloudformation list-exports --output json | jq -r '.Exports[] | select(.Name == "artillery-resources:ArtilleryWorkerRoleName") | .Value' | grep -o '[^:]*$')
40+
export artillery_worker_role_name
41+
42+
cat <<EOF > runtimeenv.env
43+
maxVusers=$maxVusers
44+
duration=$duration
45+
arrivalRate=$arrivalRate
46+
rampUpDuration=$rampUpDuration
47+
EOF
48+
49+
echo ${launch_config}
50+
51+
# shellcheck disable=SC2090,SC2086
52+
npx artillery run-fargate \
53+
--environment "${environment}" \
54+
--secret psu_api_key \
55+
--secret psu_private_key \
56+
--secret psu_kid \
57+
--region eu-west-2 \
58+
--cluster artilleryio-cluster \
59+
--security-group-ids "${security_group}" \
60+
--subnet-ids "${vpc_subnets}" \
61+
--task-role-name "${artillery_worker_role_name}" \
62+
--dotenv runtimeenv.env \
63+
--output notify_load_test.json \
64+
artillery/notify_load_test.yml
65+
66+
npx artillery report notify_load_test.json

0 commit comments

Comments
 (0)