-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-rc.yml
72 lines (66 loc) · 2.39 KB
/
azure-pipelines-rc.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
pr: none
trigger:
tags:
include:
- 'v*'
pool:
vmImage: ubuntu-latest
variables:
TAG: $[replace(variables['Build.SourceBranch'], 'refs/tags/', '')]
jobs:
- job: rc_e2e
timeoutInMinutes: 120
steps:
- script: echo $TAG
displayName: 'Output tag'
env:
TAG: $(TAG)
- script: npm install pnpm@8 -g && pnpm install && pnpm exec playwright install
displayName: 'Install dependencies'
- script: pnpm exec ts-node scripts/downloadGithubReleasePackage.ts
displayName: 'Download release artifact from GitHub'
env:
TAG: $(TAG)
- script: pnpm build:example-website
displayName: 'Build website'
env:
VITE_API_KEY: $(API_KEY)
VITE_ENDPOINT: $(VITE_ENDPOINT)
VITE_SCRIPT_URL_PATTERN: $(VITE_SCRIPT_URL_PATTERN)
NODE_OPTIONS: "--max_old_space_size=16384"
- task: AzureCLI@2
displayName: 'Deploy infrastructure'
env:
AZURE_STORAGE_ACCOUNT_NAME: $(AZURE_STORAGE_ACCOUNT_NAME)
AZURE_STORAGE_CONTAINER_NAME: $(AZURE_STORAGE_CONTAINER_NAME)
AZURE_STORAGE_RESOURCE_GROUP: $(AZURE_STORAGE_RESOURCE_GROUP)
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
FPJS_PRE_SHARED_SECRET: $(FPJS_PRE_SHARED_SECRET)
inputs:
azureSubscription: 'azure-proxy-integration-e2e-tests'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: 'pnpm e2e-deploy-infra'
- task: AzureCLI@2
inputs:
azureSubscription: 'azure-proxy-integration-e2e-tests'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: 'pnpm test:e2e'
displayName: 'Run e2e tests'
env:
CI: 'true'
- task: AzureCLI@2
inputs:
azureSubscription: 'azure-proxy-integration-e2e-tests'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: 'pnpm e2e-destroy-infra'
displayName: 'Destroy infrastructure'
condition: always()
env:
AZURE_STORAGE_ACCOUNT_NAME: $(AZURE_STORAGE_ACCOUNT_NAME)
AZURE_STORAGE_CONTAINER_NAME: $(AZURE_STORAGE_CONTAINER_NAME)
AZURE_STORAGE_RESOURCE_GROUP: $(AZURE_STORAGE_RESOURCE_GROUP)
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
FPJS_PRE_SHARED_SECRET: $(FPJS_PRE_SHARED_SECRET)