-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure.yaml
40 lines (34 loc) · 1.19 KB
/
azure.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
name: api-with-load-test
metadata:
template: [email protected]
services:
api:
project: src/api
host: containerapp
language: js
hooks:
postdeploy:
shell: sh
run: |
# Generate JMeter properties file
cd src/jmeter
echo "url=${AZURE_API_HOST}" > azd.properties
echo "port=443" >> azd.properties
echo "http=https" >> azd.properties
az extension add --upgrade --yes --name load
az load test create \
--load-test-resource ${AZURE_LOAD_TEST_NAME} \
--resource-group ${AZURE_RG} \
--test-id aca-load-test \
--load-test-config-file jmeter.yml \
--split-csv true
az load test-run create \
--load-test-resource ${AZURE_LOAD_TEST_NAME} \
--resource-group ${AZURE_RG} \
--test-id aca-load-test \
--test-run-id aca-first-run \
--display-name "AZD first run on ACA" \
--description "Test run from AZD" \
--no-wait
rm azd.properties