-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Partner Release to 1ES supporting
yml
(#29852)
Goal is to replace [this release](https://dev.azure.com/azure-sdk/internal/_release?_a=releases&view=mine&definitionId=22) with this [new build pipeline.](https://dev.azure.com/azure-sdk/internal/_build?definitionId=6992&_a=summary) [Example successful release](https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3829708&view=results) Related to Azure/azure-sdk-tools#7941
- Loading branch information
Showing
2 changed files
with
90 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
trigger: none | ||
pr: none | ||
|
||
parameters: | ||
- name: BlobPath | ||
displayName: 'Container relative blob path' | ||
type: string | ||
default: '<team>/js/<version>' | ||
- name: Tag | ||
displayName: 'The tag under which the package will be published.' | ||
type: string | ||
default: 'latest' | ||
|
||
extends: | ||
template: /eng/pipelines/templates/stages/1es-redirect.yml | ||
parameters: | ||
stages: | ||
- stage: | ||
displayName: 'Partner Release' | ||
variables: | ||
- name: Artifacts | ||
value: $(Pipeline.Workspace)/artifacts | ||
- template: /eng/pipelines/templates/variables/image.yml | ||
|
||
jobs: | ||
- job: | ||
displayName: 'Download and publish artifacts' | ||
pool: | ||
name: $(WINDOWSPOOL) | ||
image: $(WINDOWSVMIMAGE) | ||
os: windows | ||
|
||
steps: | ||
- task: AzurePowerShell@5 | ||
displayName: 'Copy from azuresdkpartnerdrops' | ||
condition: and(succeeded(), ne(variables['SkipCopyFromPartnerDrops'], 'true')) | ||
inputs: | ||
azureSubscription: 'azuresdkpartnerdrops - Storage Partner Drops' | ||
ScriptType: 'InlineScript' | ||
azurePowerShellVersion: LatestVersion | ||
pwsh: true | ||
Inline: | | ||
azcopy copy 'https://azuresdkpartnerdrops.blob.core.windows.net/drops/${{ parameters.BlobPath }}/*' '$(Artifacts)' --recursive=true | ||
echo "Copied files:" | ||
dir '$(Artifacts)' -r | % { $_.FullName } | ||
env: | ||
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED' | ||
|
||
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml | ||
parameters: | ||
ArtifactName: 'artifacts-for-release' | ||
ArtifactPath: $(Artifacts) | ||
|
||
- template: /eng/pipelines/templates/steps/npm-release-task.yml | ||
parameters: | ||
ArtifactName: Partner Drop | ||
Artifact: | ||
name: Partner Drop | ||
path: $(Artifacts) | ||
Registry: "https://registry.npmjs.org/" | ||
PathToArtifacts: $(Artifacts) | ||
Tag: "${{ parameters.Tag }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,24 +8,27 @@ parameters: | |
|
||
steps: | ||
- template: /eng/common/pipelines/templates/steps/set-default-branch.yml | ||
|
||
- ${{ if eq(parameters.Registry, 'https://registry.npmjs.org/') }}: | ||
- task: EsrpRelease@7 | ||
inputs: | ||
displayName: 'Publish ${{parameters.Artifact.name}} 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: ${{parameters.PathToArtifacts}} | ||
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: ${{parameters.Tag}} | ||
- task: EsrpRelease@7 | ||
inputs: | ||
displayName: 'Publish ${{parameters.Artifact.name}} 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: ${{parameters.PathToArtifacts}} | ||
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: ${{parameters.Tag}} | ||
|
||
- ${{ if ne(parameters.AdditionalTag, '') }}: | ||
- task: PowerShell@2 | ||
displayName: Add Additional Tag | ||
inputs: | ||
|
@@ -36,11 +39,11 @@ steps: | |
condition: succeeded() | ||
|
||
- ${{ else }}: | ||
- task: PowerShell@2 | ||
displayName: Publish to Dev Feed | ||
inputs: | ||
targetType: filePath | ||
filePath: eng/tools/publish-to-npm.ps1 | ||
arguments: -pathToArtifacts ${{parameters.PathToArtifacts}} -accessLevel "public" -tag "${{parameters.Tag}}" -additionalTag "${{parameters.AdditionalTag}}" -registry ${{parameters.Registry}} -npmToken $(azure-sdk-npm-token) | ||
pwsh: true | ||
condition: succeeded() | ||
- task: PowerShell@2 | ||
displayName: Publish to Dev Feed | ||
inputs: | ||
targetType: filePath | ||
filePath: eng/tools/publish-to-npm.ps1 | ||
arguments: -pathToArtifacts ${{parameters.PathToArtifacts}} -accessLevel "public" -tag "${{parameters.Tag}}" -additionalTag "${{parameters.AdditionalTag}}" -registry ${{parameters.Registry}} -npmToken $(azure-sdk-npm-token) | ||
pwsh: true | ||
condition: succeeded() |