|
1 | 1 | trigger: none |
2 | 2 | resources: |
3 | 3 | repositories: |
4 | | - - repository: GovernedTemplates |
| 4 | + - repository: CustomPipelineTemplates |
5 | 5 | type: git |
6 | | - name: OneBranch.Pipelines/GovernedTemplates |
7 | | - ref: refs/heads/main |
| 6 | + name: 1ESPipelineTemplates/OfficePipelineTemplates |
| 7 | + ref: refs/tags/release |
8 | 8 | pipelines: |
9 | 9 | - pipeline: microsoft-teams-library-js-pipeline |
10 | 10 | source: 'microsoft-teams-library-js/M365 Platform/App SDK/OfficeDev.microsoft-teams-library-js' |
11 | 11 | project: ISS |
12 | 12 | extends: |
13 | | - template: v2/Microsoft.Official.yml@GovernedTemplates |
| 13 | + template: v1/Office.Official.PipelineTemplate.yml@CustomPipelineTemplates |
14 | 14 | parameters: |
15 | | - platform: |
16 | | - name: m365 |
17 | | - workload: Substrate |
18 | | - serviceTreeId: $(serviceTreeId) |
19 | | - serviceGroupName: Platform |
| 15 | + pool: |
| 16 | + name: Azure-Pipelines-1ESPT-ExDShared |
| 17 | + image: windows-latest |
| 18 | + os: windows |
| 19 | + serviceTreeId: $(serviceTreeId) |
| 20 | + customBuildTags: |
| 21 | + - ES365AIMigrationTooling-Release-MOBR |
20 | 22 | stages: |
21 | 23 | - stage: Prod_Lockbox_Approval_Deployment |
22 | 24 | displayName: Lockbox Approval/Deployment |
23 | 25 | dependsOn: [] |
24 | | - variables: |
25 | | - stage_type: deployment |
26 | | - azure_subscription_ids: $(subscriptionId) |
| 26 | + templateContext: |
| 27 | + cloud: Public |
| 28 | + isProduction: true |
| 29 | + approval: |
| 30 | + workflow: lockbox |
| 31 | + scope: |
| 32 | + serviceGroupName: Platform |
| 33 | + subscriptionIds: |
| 34 | + - $(subscriptionId) |
27 | 35 | jobs: |
28 | 36 | - job: Agent_job |
29 | 37 | condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/')) |
30 | | - pool: |
31 | | - type: release |
| 38 | + templateContext: |
| 39 | + type: releaseJob |
| 40 | + workflow: m365-custom |
| 41 | + inputs: |
| 42 | + - input: pipelineArtifact |
| 43 | + pipeline: microsoft-teams-library-js-pipeline |
| 44 | + artifactName: NPMFeed |
| 45 | + targetPath: $(System.DefaultWorkingDirectory)/microsoft-teams-library-js-pipeline/NPMFeed |
| 46 | + - input: pipelineArtifact |
| 47 | + pipeline: microsoft-teams-library-js-pipeline |
| 48 | + artifactName: CDNFeed |
| 49 | + targetPath: $(System.DefaultWorkingDirectory)/microsoft-teams-library-js-pipeline/CDNFeed |
| 50 | + - input: pipelineArtifact |
| 51 | + pipeline: microsoft-teams-library-js-pipeline |
| 52 | + artifactName: scripts |
| 53 | + targetPath: $(System.DefaultWorkingDirectory)/microsoft-teams-library-js-pipeline/scripts |
32 | 54 | steps: |
33 | | - - download: microsoft-teams-library-js-pipeline |
34 | 55 | - task: prepare-deployment@1 |
35 | | - displayName: |
| 56 | + displayName: Prepare deployment |
36 | 57 | inputs: |
37 | 58 | taskType: credentialFetchTaskAzureRM |
38 | 59 | armserviceconnection: $(serviceConnectionId) |
39 | 60 | subscriptionid: $(subscriptionId) |
40 | | - - task: AzureKeyVault@2 |
41 | | - displayName: 'Azure Key Vault: $(keyVaultName)' |
| 61 | + - task: AssetRetention@3 |
| 62 | + displayName: ARtifact Retention Orchestrator Workflow (ARROW) |
42 | 63 | inputs: |
43 | | - ConnectedServiceName: $(serviceConnectionId) |
44 | | - KeyVaultName: $(keyVaultName) |
45 | | - SecretsFilter: $(keyVaultSecretsFilter) |
| 64 | + ArrowServiceConnection: $(arrowServiceConnectionId) |
| 65 | + IsShipped: true |
46 | 66 | - task: NodeTool@0 |
47 | 67 | displayName: Use Node 18.x |
48 | 68 | inputs: |
49 | 69 | versionSpec: 18.x |
50 | | - - task: PowerShell@2 |
51 | | - displayName: Update npmrc with NPM-TOKEN |
52 | | - inputs: |
53 | | - targetType: 'filePath' |
54 | | - filePath: 'tools/releases/powershell-commands/update-npmrc-with-npm-token.ps1' |
55 | | - arguments: -PIPELINE_WORKSPACE $(PIPELINE.WORKSPACE) -NPM_TOKEN $(NPM-TOKEN) |
56 | 70 | - task: Npm@1 |
57 | | - displayName: Publish to npm (tag latest) KV |
| 71 | + displayName: Build NPM package for release |
58 | 72 | inputs: |
59 | 73 | command: custom |
60 | | - workingDir: $(PIPELINE.WORKSPACE)/microsoft-teams-library-js-pipeline/NPMFeed |
| 74 | + workingDir: $(System.DefaultWorkingDirectory)/microsoft-teams-library-js-pipeline/NPMFeed |
61 | 75 | verbose: false |
62 | | - customCommand: publish --tag latest |
| 76 | + customCommand: pack |
| 77 | + - task: EsrpRelease@10 |
| 78 | + displayName: Publish to npm (tag beta) - ESRP release |
| 79 | + inputs: |
| 80 | + connectedservicename: '$(connectedServiceName)' |
| 81 | + usemanagedidentity: true |
| 82 | + keyvaultname: '$(keyVaultName)' |
| 83 | + signcertname: '$(signCertName)' |
| 84 | + clientid: '$(clientId)' |
| 85 | + intent: 'PackageDistribution' |
| 86 | + contenttype: 'npm' |
| 87 | + contentsource: 'Folder' |
| 88 | + folderlocation: '$(System.DefaultWorkingDirectory)/microsoft-teams-library-js-pipeline/NPMFeed' |
| 89 | + waitforreleasecompletion: true |
| 90 | + owners: $(owners) |
| 91 | + approvers: $(approvers) |
| 92 | + serviceendpointurl: '$(serviceEndpointUrl)' |
| 93 | + mainpublisher: '$(mainPublisher)' |
| 94 | + domaintenantid: '$(domainTenantId)' |
| 95 | + productstate: 'Latest' |
63 | 96 | - task: M365CdnAssetsUpload@3 |
64 | 97 | displayName: Push teams-js to M365 1CDN (Prod) |
65 | 98 | inputs: |
66 | | - SourcePath: $(PIPELINE.WORKSPACE)/microsoft-teams-library-js-pipeline/CDNFeed/* |
| 99 | + SourcePath: $(System.DefaultWorkingDirectory)/microsoft-teams-library-js-pipeline/CDNFeed/* |
67 | 100 | ConnectedServiceNameARM: $(serviceConnectionId) |
68 | 101 | ContainerName: teams-js |
69 | 102 | AdditionalArgumentsForBlobCopy: --overwrite=false --log-level=INFO --recursive |
70 | | - - task: AssetRetention@3 |
71 | | - displayName: ARtifact Retention Orchestrator Workflow (ARROW) |
| 103 | + - task: PowerShell@2 |
| 104 | + displayName: View Published Package URLs |
72 | 105 | inputs: |
73 | | - ArrowServiceConnection: $(arrowServiceConnectionId) |
74 | | - IsShipped: true |
| 106 | + targetType: 'filePath' |
| 107 | + filePath: 'microsoft-teams-library-js-pipeline/scripts/view-published-pkg-urls.ps1' |
| 108 | + arguments: -PIPELINE_WORKSPACE $(System.DefaultWorkingDirectory) |
0 commit comments