-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
38 lines (31 loc) · 1.19 KB
/
azure-pipelines.yml
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
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: "20.x"
displayName: "Install Node.js"
- script: |
npm install
displayName: "npm install"
# set -o pipefail
# This way if the deploy fails, we fail before piping to tee.
# Note that you are not required to use tee. We are using it in this example so that the output is available to the terminal and written to the file.
- script: |
set -o pipefail
FORCE_COLOR=0 npx @zuplo/cli deploy --api-key $(ZUPLO_API_KEY) | tee ./DEPLOYMENT_STDOUT
displayName: "Zup Deploy"
- script: |
npx @zuplo/cli test --endpoint $(cat ./DEPLOYMENT_STDOUT | sed -E 's/Deployed to (.*)/\1/')
displayName: "Zup Test"
- script: |
npx @zuplo/cli delete --url $(cat ./DEPLOYMENT_STDOUT | sed -E 's/Deployed to (.*)/\1/') --api-key $(ZUPLO_API_KEY) --wait
displayName: "Zup Delete"
# Only run this step if the build is a pull request
condition: eq(variables['Build.Reason'], 'PullRequest')
# This is not necessary but it showcases how you can list your zups
- script: |
npx @zuplo/cli list --api-key $(ZUPLO_API_KEY)
displayName: "Zup List"