-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
77 lines (65 loc) · 2 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
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
73
74
75
76
77
name: Opdex-UI
trigger:
- main
pool:
vmImage: ubuntu-latest
variables:
location: 'Central US'
azureSubscription: 'sub-opdex-dev'
ARTIFACT_NAME: platform-ui
artifactName: ReleaseArtifact
releaseTemplate: 'azure-pipelines.release.yml'
stages:
- stage: CI
displayName: 'Continuous Integration'
jobs:
- job: Build
displayName: Build and Publish
variables:
SOLUTION: 'Opdex.sln'
BUILD_CONFIGURATION: 'Release'
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run build-prod
displayName: 'npm install and build'
- task: ArchiveFiles@2
displayName: 'Archive files'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/dist/OpdexUI'
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
ArtifactName: '$(ARTIFACT_NAME)'
publishLocation: 'Container'
# - stage: DEV
# displayName: 'Release to devnet (Azure)'
# dependsOn: CI
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) # Don't run deployment for PRs against the branch.
# jobs:
# - template: ${{ variables.releaseTemplate }}
# parameters:
# environment: 'dev'
- stage: TEST
displayName: 'Release to testnet (Azure)'
dependsOn: CI
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) # Don't run deployment for PRs against the branch.
jobs:
- template: ${{ variables.releaseTemplate }}
parameters:
environment: 'test'
- stage: MAIN
displayName: 'Release to mainnet (Azure)'
dependsOn: TEST
jobs:
- template: ${{ variables.releaseTemplate }}
parameters:
environment: 'main'