Skip to content

Commit 5c8d1fc

Browse files
authored
Using the unified pipeline template for package publish (#361)
* Use the common template for NPM package publish * Added service connection * Added ref to the specific tag of releases
1 parent 41c3493 commit 5c8d1fc

File tree

2 files changed

+11
-70
lines changed

2 files changed

+11
-70
lines changed

azure-pipelines.yml

Lines changed: 11 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
trigger:
22
- main
33

4+
resources:
5+
repositories:
6+
- repository: azure-sdk-tools
7+
type: github
8+
name: Azure/azure-sdk-tools
9+
endpoint: Azure
10+
ref: refs/tags/azure-sdk-tools_20250709.1
11+
412
extends:
513
template: /eng/1es-redirect.yml
614
parameters:
@@ -37,57 +45,8 @@ extends:
3745
# only include if running on `internal` build with manual queue, otherwise never include
3846
- ${{ if and(in(variables['Build.Reason'], 'Manual', ''), eq(variables['System.TeamProject'], 'internal'))}}:
3947
- stage: Publish
40-
displayName: Publish
4148
dependsOn: Build_And_Test
42-
4349
jobs:
44-
- deployment: Publish
45-
environment: 'package-publish'
46-
pool:
47-
name: azsdk-pool
48-
image: ubuntu-24.04
49-
os: linux
50-
51-
strategy:
52-
runOnce:
53-
deploy:
54-
steps:
55-
- checkout: self
56-
submodules: false
57-
58-
- download: current
59-
artifact: drop
60-
timeoutInMinutes: 5
61-
62-
- task: PowerShell@2
63-
inputs:
64-
filePath: '$(Build.SourcesDirectory)/eng/scripts/determine-release-tag.ps1'
65-
failOnStderr: true
66-
pwsh: true
67-
68-
- pwsh: |
69-
Write-Host "Will deploy with tag of $(Tag)"
70-
Get-ChildItem "$(Pipeline.Workspace)/drop" -Recurse -Force `
71-
| Where-Object { $_.Name -like "*.tgz" } `
72-
| Copy-Item -Destination "$(Build.ArtifactStagingDirectory)"
73-
74-
Get-ChildItem "$(Build.ArtifactStagingDirectory)" -Recurse -Force | % { Write-Host $_.FullName }
75-
displayName: Move artifact to $(Build.ArtifactStagingDirectory)
76-
77-
- task: EsrpRelease@9
78-
displayName: 'Publish oav to ESRP'
79-
inputs:
80-
ConnectedServiceName: 'Azure SDK PME Managed Identity'
81-
ClientId: '5f81938c-2544-4f1f-9251-dd9de5b8a81b'
82-
DomainTenantId: '975f013f-7f24-47e8-a7d3-abc4752bf346'
83-
UseManagedIdentity: true
84-
KeyVaultName: 'kv-azuresdk-codesign'
85-
SignCertName: 'azure-sdk-esrp-release-certificate'
86-
Intent: 'PackageDistribution'
87-
ContentType: 'npm'
88-
FolderLocation: $(Build.ArtifactStagingDirectory)
89-
Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}
90-
Approvers: 'azuresdk@microsoft.com'
91-
ServiceEndpointUrl: 'https://api.esrp.microsoft.com'
92-
MainPublisher: 'ESRPRELPACMANTEST'
93-
productstate: $(Tag)
50+
- template: /eng/common/pipelines/templates/jobs/npm-publish.yml@azure-sdk-tools
51+
parameters:
52+
ArtifactName: drop-linux

eng/scripts/determine-release-tag.ps1

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)