-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild-pipeline.yml
More file actions
78 lines (65 loc) · 2.18 KB
/
Copy pathbuild-pipeline.yml
File metadata and controls
78 lines (65 loc) · 2.18 KB
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
trigger:
branches:
include:
- 'vnext'
- 'btraykov-azure-pipeline'
- 'master'
# This pipeline is meant to run on changes pushed to the vnext branch only.
# If it runs on PRs, it will create PRs to the destination repos' vnext branches - we don't want that.
pr: none
name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
parameters:
- name: isVerbose
displayName: 'Get verbose output from steps - where configurable'
type: boolean
default: false
pool:
name: BuildAgentOnPrem
jobs:
- job:
displayName: Build
workspace:
clean: resources
steps:
- checkout: self
clean: true
persistCredentials: true
path: igniteui-angular-examples # this is explicitly required by the samples browser build process
- task: NodeTool@0
inputs:
versionSource: 'spec'
versionSpec: '20.19.0'
- task: Npm@1
displayName: 'npm install'
inputs:
command: 'custom'
workingDir: '$(Build.SourcesDirectory)\browser'
customCommand: 'install --legacy-peer-deps'
- task: PowerShell@2
displayName: 'Apply very special configuration'
inputs:
targetType: 'inline'
script: |
Write-Output $pwd
((Get-Content -Path package.json -Raw) -replace 'build --configuration production','build --configuration production --base-href=/angular-demos-dv/') | Set-Content -Path package.json
workingDirectory: '$(Build.SourcesDirectory)\browser'
- task: Npm@1
displayName: 'npm run build'
inputs:
command: 'custom'
workingDir: '$(Build.SourcesDirectory)\browser'
customCommand: 'run build'
verbose: ${{ parameters.isVerbose }}
- task: CopyFiles@2
inputs:
SourceFolder: '$(Build.SourcesDirectory)\browser'
Contents: 'web.config'
TargetFolder: '$(Build.SourcesDirectory)\browser\dist\browser'
OverWrite: true
- task: PublishPipelineArtifact@1
inputs:
targetPath: '$(Build.SourcesDirectory)\browser\dist\browser'
artifact: 'dist'
publishLocation: 'pipeline'
# TODO Once the project can adhere to the IG Angular schematic,
# use it or use npx to call igniteui-cli to apply the Angular schematic (trial -> licensed)