-
Notifications
You must be signed in to change notification settings - Fork 15
/
azure-pipelines.yml
140 lines (122 loc) · 4.56 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
trigger:
- main
extends:
template: /eng/1es-redirect.yml
parameters:
stages:
- stage: Build_And_Test
displayName: 'Build and Test'
variables:
- template: /eng/image.yml
jobs:
- job: Build
pool:
image: $(LINUXVMIMAGE)
name: $(LINUXPOOL)
os: linux
steps:
- task: NodeTool@0
displayName: 'Install Node'
inputs:
versionSpec: 20.x
- script: npm ci
displayName: 'npm ci'
- script: npm ls -a
displayName: 'npm ls -a'
condition: succeededOrFailed()
continueOnError: true
- task: Npm@1
displayName: 'npm pack'
inputs:
command: custom
verbose: false
customCommand: pack
- task: CopyFiles@2
displayName: 'Copy Files to: drop'
inputs:
Contents: '*.tgz'
TargetFolder: $(Build.ArtifactStagingDirectory)
- template: /eng/publish-1es-artifact.yml
parameters:
artifactName: 'drop'
artifactPath: '$(Build.ArtifactStagingDirectory)'
- job: Test_Windows
strategy:
matrix:
Win.Node18:
node.version: 18.x
Win.Node20:
node.version: 20.x
pool:
image: $(WINDOWSVMIMAGE)
name: $(WINDOWSPOOL)
os: windows
steps:
- template: /eng/test-steps.yml
parameters:
version: $(node.version)
- job: Test_Linux
strategy:
matrix:
Linux.Node18:
node.version: 18.x
Linux.Node20:
node.version: 20.x
pool:
image: $(LINUXVMIMAGE)
name: $(LINUXPOOL)
os: linux
steps:
- template: /eng/test-steps.yml
parameters:
version: $(node.version)
# only include if running on `internal` build with manual queue, otherwise never include
- ${{ if and(in(variables['Build.Reason'], 'Manual', ''), eq(variables['System.TeamProject'], 'internal'))}}:
- stage: Publish
displayName: Publish
dependsOn: Build_And_Test
jobs:
- deployment: Publish
environment: 'package-publish'
pool:
name: azsdk-pool-mms-ubuntu-2004-general
image: azsdk-pool-mms-ubuntu-2004-1espt
os: linux
strategy:
runOnce:
deploy:
steps:
- checkout: self
submodules: false
- download: current
artifact: drop
timeoutInMinutes: 5
- task: PowerShell@2
inputs:
filePath: '$(Build.SourcesDirectory)/eng/scripts/determine-release-tag.ps1'
failOnStderr: true
pwsh: true
- pwsh: |
Write-Host "Will deploy with tag of $(Tag)"
Get-ChildItem "$(Pipeline.Workspace)/drop" -Recurse -Force `
| Where-Object { $_.Name -like "*.tgz" } `
| Copy-Item -Destination "$(Build.ArtifactStagingDirectory)"
Get-ChildItem "$(Build.ArtifactStagingDirectory)" -Recurse -Force | % { Write-Host $_.FullName }
displayName: Move artifact to $(Build.ArtifactStagingDirectory)
- task: EsrpRelease@7
inputs:
displayName: 'Publish oav to ESRP'
ConnectedServiceName: 'Azure SDK Engineering System'
ClientId: '5f81938c-2544-4f1f-9251-dd9de5b8a81b'
KeyVaultName: 'AzureSDKEngKeyVault'
AuthCertName: 'azure-sdk-esrp-release-auth-certificate'
SignCertName: 'azure-sdk-esrp-release-sign-certificate'
Intent: 'PackageDistribution'
ContentType: 'npm'
FolderLocation: $(Build.ArtifactStagingDirectory)
Owners: ${{ coalesce(variables['Build.RequestedForEmail'], '[email protected]') }}
Approvers: '[email protected]'
ServiceEndpointUrl: 'https://api.esrp.microsoft.com'
MainPublisher: 'ESRPRELPACMANTEST'
DomainTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
productstate: $(Tag)