Skip to content

Commit

Permalink
ci: fix invalid RC e2e tests pipeline config
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Jun 20, 2024
1 parent f35d4ee commit a385b68
Showing 1 changed file with 57 additions and 55 deletions.
112 changes: 57 additions & 55 deletions azure-pipelines-rc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pr: none
timeoutInMinutes: 120
trigger:
tags:
include:
Expand All @@ -11,60 +10,63 @@ pool:
variables:
TAG: $[replace(variables['Build.SourceBranch'], 'refs/tags/', '')]

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"
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
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 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)
- 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)

0 comments on commit a385b68

Please sign in to comment.