Skip to content

Commit c07aad1

Browse files
authored
Merge pull request #163 from microsoftgraph/andrueastman/pipelineFixes
fix: refactor pipeline to use latest templates
2 parents d9bc7df + 5bca226 commit c07aad1

File tree

1 file changed

+82
-24
lines changed

1 file changed

+82
-24
lines changed
Lines changed: 82 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,85 @@
1-
# Production build pipeline preparing for npm publish
2-
1+
# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
2+
# Please make sure to check all the converted content, it is your team's responsibility to make sure that the pipeline is still valid and functions as expected.
3+
# This pipeline will be extended to the OneESPT template
4+
# The pool section has been filled with placeholder values, replace the pool section with your hosted pool, os, and image name. If you are using a Linux image, you must specify an additional windows image for SDL: https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/1es-pipeline-templates/features/sdlanalysis/overview#how-to-specify-a-windows-pool-for-the-sdl-source-analysis-stage
5+
name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
36
trigger:
4-
- main
5-
6-
pool:
7-
vmImage: ubuntu-latest
8-
9-
steps:
7+
branches:
8+
include:
9+
- main
10+
paths:
11+
include:
12+
- microsoft-graph.d.ts
13+
pr: none
14+
resources:
15+
repositories:
16+
- repository: 1ESPipelineTemplates
17+
type: git
18+
name: 1ESPipelineTemplates/1ESPipelineTemplates
19+
ref: refs/tags/release
20+
extends:
21+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
22+
parameters:
23+
pool:
24+
name: Azure-Pipelines-1ESPT-ExDShared
25+
image: windows-latest
26+
os: windows
27+
customBuildTags:
28+
- ES365AIMigrationTooling
29+
stages:
30+
- stage: build
31+
jobs:
32+
- job: job
33+
templateContext:
34+
outputs:
35+
- output: pipelineArtifact
36+
displayName: 'Publish Artifact drop'
37+
targetPath: '$(Build.ArtifactStagingDirectory)'
38+
artifactName: build-drop
39+
steps:
40+
- checkout: self
41+
displayName: checkout main
42+
- task: CopyFiles@2
43+
displayName: 'Copy Files to staging directory'
44+
inputs:
45+
SourceFolder: '$(System.DefaultWorkingDirectory)'
46+
Contents: |
47+
**/*
48+
!spec/**
49+
!.azure-pipelines/**
50+
!.github/**
51+
!.git/**
52+
!.vscode/**
53+
!typings-demo.gif
54+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
1055

11-
- script: git checkout main
12-
- task: CopyFiles@2
13-
displayName: 'Copy Files to staging directory'
14-
inputs:
15-
SourceFolder: '$(System.DefaultWorkingDirectory)'
16-
Contents: |
17-
**/*
18-
!spec/**
19-
!.azure-pipelines/**
20-
!.github/**
21-
!.git/**
22-
!.vscode/**
23-
!typings-demo.gif
24-
TargetFolder: '$(Build.ArtifactStagingDirectory)'
2556

26-
- task: PublishBuildArtifacts@1
27-
displayName: 'Publish Artifact: drop'
57+
- stage: deploy
58+
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
59+
jobs:
60+
- deployment: deploy_npm
61+
pool:
62+
name: Azure-Pipelines-1ESPT-ExDShared
63+
os: windows
64+
image: windows-latest
65+
dependsOn: []
66+
environment: msgraph-npm-org
67+
strategy:
68+
runOnce:
69+
deploy:
70+
steps:
71+
- download: current
72+
artifact: build-drop
73+
- task: EsrpRelease@5
74+
inputs:
75+
ConnectedServiceName: 'MsGraph-ESRP-Publisher-Service-Connection'
76+
Intent: 'PackageDistribution'
77+
ContentType: 'npm'
78+
ContentSource: 'Folder'
79+
FolderLocation: $(Pipeline.Workspace)/build-drop/
80+
WaitForReleaseCompletion: true
81+
82+
83+
ServiceEndpointUrl: 'https://api.esrp.microsoft.com'
84+
MainPublisher: 'ESRPRELPACMAN'
85+
DomainTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2'

0 commit comments

Comments
 (0)