-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
71 lines (63 loc) · 1.87 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
name: "$(BuildID).$(date:yyMMdd)"
trigger:
batch: true
branches:
include:
- main
pool:
vmImage: "ubuntu-latest"
variables:
versionNumber: "0.1.$(Build.BuildNumber)"
qaEnvironment: "cns-site-qa"
prodEnvironment: "cns-site-prod"
webArtifactName: chia-name-service
stages:
- stage: build
displayName: Build
jobs:
- job: Build
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
displayName: "Install Node.js"
- task: CmdLine@2
inputs:
workingDirectory: "$(Build.SourcesDirectory)"
script: "yarn"
displayName: "yarn"
- task: CmdLine@2
inputs:
workingDirectory: "$(Build.SourcesDirectory)"
script: "yarn build"
displayName: "yarn build"
- task: PublishPipelineArtifact@1
inputs:
ArtifactName: '$(webArtifactName)'
targetPath: '$(Build.SourcesDirectory)/dist'
- stage: qa
displayName: qa
condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/main'))
dependsOn:
- build
jobs:
- deployment: qadeploy
displayName: qaDeploy
timeoutInMinutes: 10
cancelTimeoutInMinutes: 1
environment: $(qaEnvironment)
strategy:
runOnce:
deploy:
steps:
- task: FtpUpload@2
inputs:
credentialsOption: "serviceEndpoint"
serverEndpoint: "cns_site_qa_ftp"
rootDirectory: "$(Pipeline.Workspace)/$(webArtifactName)"
filePatterns: "**"
remoteDirectory: "/"
clean: false
cleanContents: false
preservePaths: true
trustSSL: false