forked from mohamedsaif/IntelligentExperiences.OnContainers
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines-angular.yml
56 lines (47 loc) · 1.58 KB
/
azure-pipelines-angular.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
# Azure Pipelines for Angular app :)
# More info: https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=vsts
parameters:
Name: 'AngularApp'
jobs:
- job: ${{ Parameters.Name }}
pool:
vmImage: 'vs2017-win2016'
demands: npm
steps:
- task: qetza.replacetokens.replacetokens-task.replacetokens@3
displayName: 'Replace tokens in *.ts *.html'
inputs:
rootDirectory: 'Src/FaceExplorer-App/src/app'
targetFiles: '**/*.ts,**/*.html'
- script: npm install -g @angular/cli
displayName: Install Angular-CLI via NPM
- task: Npm@1
displayName: 'Project Dependencies Install'
inputs:
workingDir: 'Src/FaceExplorer-App'
verbose: false
- script: 'ng build --prod'
workingDirectory: 'Src/FaceExplorer-App'
displayName: 'Build Angular App'
- task: Npm@1
displayName: 'npm install for dist/ folder'
inputs:
workingDir: 'Src/FaceExplorer-App/dist'
verbose: false
- task: CopyFiles@2
displayName: 'Copy .config to: Src/FaceExplorer-App/dist'
inputs:
SourceFolder: 'Src/FaceExplorer-App/src'
Contents: '*.config'
TargetFolder: 'Src/FaceExplorer-App/dist'
- task: ArchiveFiles@2
displayName: 'Archive Src/FaceExplorer-App/dist'
inputs:
rootFolderOrFile: 'Src/FaceExplorer-App/dist'
includeRootFolder: false
archiveFile: 'Src/FaceExplorer-App/zip/$(Build.BuildId).zip'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: FaceExplorer-App-Dist'
inputs:
PathtoPublish: 'Src/FaceExplorer-App/zip'
ArtifactName: 'FaceExplorer-App-Dist'