-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
65 lines (65 loc) · 2.03 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
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: 'Ubuntu-16.04'
variables:
- group: secrets
steps:
- task: NodeTool@0
inputs:
versionSpec: '11.x'
displayName: 'Install Node.js'
- script: |
npm install
displayName: 'npm install'
- script: |
npm run test
displayName: 'run tests'
- script: |
npm run build -- --prerender
displayName: 'Build'
- script: |
displayName: 'install browserstack dependencies'
- script: |
export HOST_IP="$(hostname -i | awk '{print $1}')"
npm run browserstack
displayName: 'Run browserstack e2e tests'
env:
browserstackkey: $(browserstackkey)
browserstackuser: $(browserstackuser)
BUILD_ID: $(Build.BuildNumber)
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'www'
targetPath: '$(System.DefaultWorkingDirectory)/www'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'fbconfig'
targetPath: '$(System.DefaultWorkingDirectory)/firebase.json'
- stage: Deploy
jobs:
- deployment: DeployFirebase
pool:
vmImage: 'Ubuntu-16.04'
variables:
- group: secrets
environment: 'production'
strategy:
runOnce:
deploy:
steps:
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'www'
targetPath: $(System.DefaultWorkingDirectory)/www
- task: DownloadPipelineArtifact@1
inputs:
artifactName: 'fbconfig'
targetPath: $(System.DefaultWorkingDirectory)
- script: 'sudo npm install -g firebase-tools'
displayName: 'Firebase tools'
- script: 'sudo firebase deploy --token $(fb_ci_token) --project $(fb_production_project) --message "Build: $(Build.BuildNumber)"'
displayName: 'Firebase deploy'