Skip to content

Commit 3e6dacf

Browse files
authored
Merge pull request #2995 from microsoftgraph/2989-migrate-ado-release-pipeline-from-classic-ui-to-1es
2989 migrate ado release pipeline from classic UI to 1es
2 parents 5b27da0 + 64506e9 commit 3e6dacf

File tree

1 file changed

+63
-8
lines changed

1 file changed

+63
-8
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ parameters:
1414
- name: Sign
1515
type: boolean
1616
default: true
17+
- name: InternalFeed
18+
type: string
19+
default: '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build'
20+
displayName: Internal NuGet Feed
21+
values:
22+
- '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_v2'
23+
- 'ATPopFeed'
24+
- '0985d294-5762-4bc2-a565-161ef349ca3e/PowerShell_V2_Build'
1725

1826
variables:
1927
BuildAgent: ${{ parameters.BuildAgent }}
@@ -64,13 +72,6 @@ extends:
6472
targetPath: '$(Build.ArtifactStagingDirectory)'
6573
artifactName: 'drop'
6674
publishLocation: 'Container'
67-
- ${{ if and(eq(parameters.Pack, true), eq(parameters.Sign, true)) }}:
68-
- output: nuget
69-
displayName: 'Publish NuGet to feed'
70-
packageParentPath: '$(Build.ArtifactStagingDirectory)'
71-
packagesToPush: $(Build.ArtifactStagingDirectory)/**/Microsoft.Graph.*.nupkg
72-
publishVstsFeed: $(PROJECT_NAME)/$(FEED_NAME)
73-
allowPackageConflicts: true
7475
steps:
7576
- script: |
7677
git submodule update --init --recursive
@@ -103,4 +104,58 @@ extends:
103104
FolderPath: "$(Build.ArtifactStagingDirectory)"
104105
Pattern: "Microsoft.Graph*.nupkg"
105106

106-
- template: .azure-pipelines/common-templates/security-post-checks.yml@self
107+
- template: .azure-pipelines/common-templates/security-post-checks.yml@self
108+
- stage: 'Deploy_to_Internal_Feed'
109+
dependsOn: stage
110+
jobs:
111+
- deployment: 'DeployToInternalFeed'
112+
displayName: 'Deploy to Internal Feed'
113+
environment: 'PowerShellInternalFeed'
114+
strategy:
115+
runOnce:
116+
deploy:
117+
steps:
118+
- checkout: self
119+
- task: DownloadPipelineArtifact@2
120+
displayName: 'Download Build Artifacts'
121+
inputs:
122+
buildType: 'current'
123+
targetPath: '$(System.DefaultWorkingDirectory)'
124+
- task: 1ES.PublishNuget@1
125+
displayName: 'Publish NuGet to feed'
126+
inputs:
127+
useDotNetTask: false
128+
packageParentPath: '$(System.DefaultWorkingDirectory)'
129+
packagesToPush: '$(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg'
130+
publishVstsFeed: ${{ parameters.InternalFeed }}
131+
nuGetFeedType: internal
132+
allowPackageConflicts: true
133+
- stage: 'Deploy_to_PsGallery'
134+
dependsOn: stage
135+
jobs:
136+
- deployment: 'DeployToPowerShellGallery'
137+
displayName: 'Deploy to PowerShell Gallery'
138+
environment: 'PowerShellGallery'
139+
strategy:
140+
runOnce:
141+
deploy:
142+
steps:
143+
- checkout: self
144+
- task: DownloadPipelineArtifact@2
145+
displayName: 'Download Build Artifacts'
146+
inputs:
147+
buildType: 'current'
148+
targetPath: '$(System.DefaultWorkingDirectory)'
149+
- task: 1ES.PublishNuget@1
150+
displayName: 'Publish NuGet to feed'
151+
inputs:
152+
useDotNetTask: false
153+
packageParentPath: '$(System.DefaultWorkingDirectory)'
154+
packagesToPush: '$(System.DefaultWorkingDirectory)/**/drop/**/*.nupkg'
155+
nuGetFeedType: external
156+
publishFeedCredentials: 'microsoftgraph PowerShell Gallery connection'
157+
158+
159+
160+
161+

0 commit comments

Comments
 (0)