forked from digitalpalireader/digitalpalireader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
66 lines (56 loc) · 1.85 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
name: 5.$(Date:yy).$(Date:MMdd)$(Rev:.rr)
trigger:
- master
pool:
vmImage: "ubuntu-latest"
steps:
- script: |
sudo apt-get install zip
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
sudo chmod +x build.sh
- task: CmdLine@2
displayName: Install dependencies...
inputs:
script: |
echo ========================================================================
echo Installing dependencies...
echo ========================================================================
yarn --no-progress --non-interactive --frozen-lockfile
- task: CmdLine@2
displayName: Build index.js
inputs:
script: |
yarn build
- task: PowerShell@2
displayName: Run cache buster
inputs:
targetType: filePath
filePath: '$(Build.SourcesDirectory)/bin/bustCache.ps1'
arguments: '"$(Build.SourcesDirectory)/_dprhtml/index.html"'
failOnStderr: true
pwsh: true
workingDirectory: '$(Build.SourcesDirectory)'
- task: CmdLine@2
displayName: Build service worker...
inputs:
script: |
yarn build:sw
- task: Bash@3
displayName: Create build artifact
inputs:
filePath: "build.sh"
arguments: $(Build.BinariesDirectory) $(Build.Repository.LocalPath)
workingDirectory: "$(Build.Repository.LocalPath)"
- task: CopyFiles@2
inputs:
SourceFolder: "$(Build.BinariesDirectory)"
Contents: "**"
TargetFolder: "$(Build.ArtifactStagingDirectory)"
CleanTargetFolder: true
OverWrite: true
- task: PublishBuildArtifacts@1
displayName: "Publish build artifacts"
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/dev')))