-
Notifications
You must be signed in to change notification settings - Fork 11
/
azure-pipelines-20.yml
87 lines (83 loc) · 2.06 KB
/
azure-pipelines-20.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
78
79
80
81
82
83
84
85
86
87
trigger:
- task: CodeDeployDeployApplication@1
inputs:
awsCredentials: 'AWS Service Con'
regionName: 'us-east-1'
applicationName: 'Dev-erp-Frontend'
deploymentGroupName: 'Dev-erp-Frontend'
deploymentRevisionSource: 'workspace'
revisionBundle: 'Dev-erp-Frontend-Rev'
bucketName: 'Dev-erp-Frontend'
fileExistsBehavior: 'OVERWRITE'
batch: "true"
branches:
include:
- master
- dev
paths:
include:
- ./*
pr:
branches:
include:
- master
- dev
paths:
include:
- ./*
jobs:
- job: Build_Job
displayName: Build
pool:
vmImage: 'ubuntu-18.04'
demands:
- npm
steps:
- checkout: self
clean: false
# - powershell: 'npm cache clean --force'
# displayName: 'PowerShell Script'
# env:
# APPDATA: npm-cache
- task: Npm@1
displayName: 'Npm Install'
inputs:
workingDir: "./"
command: "ci"
- task: Npm@1
displayName: 'Lint Client App'
inputs:
workingDir: "./"
command: "custom"
customCommand: "run lint"
continueOnError: true
- task: Npm@1
displayName: 'Copy Assets'
inputs:
workingDir: "./"
command: "custom"
customCommand: "run copy-files"
continueOnError: false
- task: Npm@1
displayName: 'Build Client App'
inputs:
workingDir: "./"
command: "custom"
customCommand: "run build:prod"
# Archive files
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)'
includeRootFolder: true
archiveType: 'zip' # Options: zip, 7z, tar, wim
archiveFile: '$(Build.ArtifactStagingDirectory)/www.zip'
replaceExistingArchive: true
- task: CopyFiles@2
inputs:
Contents: 'www/**'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'titas-ecom-erp'