7
7
include :
8
8
- main
9
9
- support/v1
10
- - task/move-to-deploy-stage
11
10
tags :
12
11
include :
13
12
- ' v*'
16
15
include :
17
16
- main
18
17
- support/v1
19
- - task/move-to-deploy-stage
20
18
21
19
variables :
22
20
buildPlatform : ' Any CPU'
23
21
buildConfiguration : ' Release'
24
22
ProductBinPath : ' $(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)'
25
- REGISTRY : ' msgraphpperegistry .azurecr.io'
23
+ REGISTRY : ' msgraphprodregistry .azurecr.io'
26
24
IMAGE_NAME : ' public/openapi/hidi'
27
- PREVIEW_BRANCH : ' refs/heads/task/move-to-deploy-stage '
25
+ PREVIEW_BRANCH : ' refs/heads/main '
28
26
29
27
resources :
30
28
repositories :
@@ -225,126 +223,126 @@ extends:
225
223
os : linux
226
224
image : ubuntu-latest
227
225
jobs :
228
- # - deployment: deploy_hidi
229
- # condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
230
- # templateContext:
231
- # type: releaseJob
232
- # isProduction: true
233
- # inputs:
234
- # - input: pipelineArtifact
235
- # artifactName: Nugets
236
- # targetPath: '$(Pipeline.Workspace)'
237
- # dependsOn: []
238
- # environment: nuget-org
239
- # strategy:
240
- # runOnce:
241
- # deploy:
242
- # pool:
243
- # vmImage: ubuntu-latest
244
- # steps:
245
- # - task: 1ES.PublishNuget@1
246
- # displayName: 'NuGet push'
247
- # inputs:
248
- # packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg'
249
- # packageParentPath: '$(Pipeline.Workspace)'
250
- # nuGetFeedType: external
251
- # publishFeedCredentials: 'OpenAPI Nuget Connection'
226
+ - deployment : deploy_hidi
227
+ condition : and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
228
+ templateContext :
229
+ type : releaseJob
230
+ isProduction : true
231
+ inputs :
232
+ - input : pipelineArtifact
233
+ artifactName : Nugets
234
+ targetPath : ' $(Pipeline.Workspace)'
235
+ dependsOn : []
236
+ environment : nuget-org
237
+ strategy :
238
+ runOnce :
239
+ deploy :
240
+ pool :
241
+ vmImage : ubuntu-latest
242
+ steps :
243
+ - task : 1ES.PublishNuget@1
244
+ displayName : ' NuGet push'
245
+ inputs :
246
+ packagesToPush : ' $(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg'
247
+ packageParentPath : ' $(Pipeline.Workspace)'
248
+ nuGetFeedType : external
249
+ publishFeedCredentials : ' OpenAPI Nuget Connection'
252
250
253
- # - deployment: deploy_lib
254
- # condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
255
- # templateContext:
256
- # type: releaseJob
257
- # isProduction: true
258
- # inputs:
259
- # - input: pipelineArtifact
260
- # artifactName: Nugets
261
- # targetPath: '$(Pipeline.Workspace)'
262
- # dependsOn: []
263
- # environment: nuget-org
264
- # strategy:
265
- # runOnce:
266
- # deploy:
267
- # pool:
268
- # vmImage: ubuntu-latest
269
- # steps:
270
- # - powershell: |
271
- # $fileNames = "$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.Workbench.*.nupkg"
272
- # foreach($fileName in $fileNames) {
273
- # if(Test-Path $fileName) {
274
- # rm $fileName -Verbose
275
- # }
276
- # }
277
- # displayName: remove other nupkgs to avoid duplication
278
- # - task: 1ES.PublishNuget@1
279
- # displayName: 'NuGet push'
280
- # inputs:
281
- # packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.*.nupkg'
282
- # packageParentPath: '$(Pipeline.Workspace)'
283
- # nuGetFeedType: external
284
- # publishFeedCredentials: 'OpenAPI Nuget Connection'
251
+ - deployment : deploy_lib
252
+ condition : and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
253
+ templateContext :
254
+ type : releaseJob
255
+ isProduction : true
256
+ inputs :
257
+ - input : pipelineArtifact
258
+ artifactName : Nugets
259
+ targetPath : ' $(Pipeline.Workspace)'
260
+ dependsOn : []
261
+ environment : nuget-org
262
+ strategy :
263
+ runOnce :
264
+ deploy :
265
+ pool :
266
+ vmImage : ubuntu-latest
267
+ steps :
268
+ - powershell : |
269
+ $fileNames = "$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.Workbench.*.nupkg"
270
+ foreach($fileName in $fileNames) {
271
+ if(Test-Path $fileName) {
272
+ rm $fileName -Verbose
273
+ }
274
+ }
275
+ displayName: remove other nupkgs to avoid duplication
276
+ - task : 1ES.PublishNuget@1
277
+ displayName : ' NuGet push'
278
+ inputs :
279
+ packagesToPush : ' $(Pipeline.Workspace)/Microsoft.OpenApi.*.nupkg'
280
+ packageParentPath : ' $(Pipeline.Workspace)'
281
+ nuGetFeedType : external
282
+ publishFeedCredentials : ' OpenAPI Nuget Connection'
285
283
286
- # - deployment: deploy_yaml_reader
287
- # condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
288
- # templateContext:
289
- # type: releaseJob
290
- # isProduction: true
291
- # inputs:
292
- # - input: pipelineArtifact
293
- # artifactName: Nugets
294
- # targetPath: '$(Pipeline.Workspace)'
295
- # dependsOn: deploy_lib
296
- # environment: nuget-org
297
- # strategy:
298
- # runOnce:
299
- # deploy:
300
- # pool:
301
- # vmImage: ubuntu-latest
302
- # steps:
303
- # - task: 1ES.PublishNuget@1
304
- # displayName: 'NuGet push'
305
- # inputs:
306
- # packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg'
307
- # packageParentPath: '$(Pipeline.Workspace)'
308
- # nuGetFeedType: external
309
- # publishFeedCredentials: 'OpenAPI Nuget Connection'
284
+ - deployment : deploy_yaml_reader
285
+ condition : and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
286
+ templateContext :
287
+ type : releaseJob
288
+ isProduction : true
289
+ inputs :
290
+ - input : pipelineArtifact
291
+ artifactName : Nugets
292
+ targetPath : ' $(Pipeline.Workspace)'
293
+ dependsOn : deploy_lib
294
+ environment : nuget-org
295
+ strategy :
296
+ runOnce :
297
+ deploy :
298
+ pool :
299
+ vmImage : ubuntu-latest
300
+ steps :
301
+ - task : 1ES.PublishNuget@1
302
+ displayName : ' NuGet push'
303
+ inputs :
304
+ packagesToPush : ' $(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg'
305
+ packageParentPath : ' $(Pipeline.Workspace)'
306
+ nuGetFeedType : external
307
+ publishFeedCredentials : ' OpenAPI Nuget Connection'
310
308
311
- # - deployment: create_github_release
312
- # templateContext:
313
- # type: releaseJob
314
- # isProduction: true
315
- # inputs:
316
- # - input: pipelineArtifact
317
- # artifactName: Nugets
318
- # targetPath: '$(Pipeline.Workspace)'
319
- # dependsOn: []
320
- # environment: kiota-github-releases
321
- # strategy:
322
- # runOnce:
323
- # deploy:
324
- # pool:
325
- # vmImage: ubuntu-latest
326
- # steps:
327
- # - pwsh: |
328
- # $artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
329
- # $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
330
- # #Set Variable $artifactName and $artifactVersion
331
- # Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion"
332
- # echo "$artifactVersion"
333
- # displayName: 'Fetch Artifact Name'
334
- # - task: GitHubRelease@1
335
- # displayName: 'GitHub release (edit)'
336
- # condition: succeededOrFailed()
337
- # inputs:
338
- # gitHubConnection: 'Github-MaggieKimani1'
339
- # action: edit
340
- # tagSource: userSpecifiedTag
341
- # tag: 'v$(artifactVersion)'
342
- # releaseNotesSource: inline
343
- # assets: '$(Pipeline.Workspace)\**\*.exe'
344
- # addChangeLog: false
309
+ - deployment : create_github_release
310
+ templateContext :
311
+ type : releaseJob
312
+ isProduction : true
313
+ inputs :
314
+ - input : pipelineArtifact
315
+ artifactName : Nugets
316
+ targetPath : ' $(Pipeline.Workspace)'
317
+ dependsOn : []
318
+ environment : kiota-github-releases
319
+ strategy :
320
+ runOnce :
321
+ deploy :
322
+ pool :
323
+ vmImage : ubuntu-latest
324
+ steps :
325
+ - pwsh : |
326
+ $artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
327
+ $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
328
+ #Set Variable $artifactName and $artifactVersion
329
+ Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion"
330
+ echo "$artifactVersion"
331
+ displayName: 'Fetch Artifact Name'
332
+ - task : GitHubRelease@1
333
+ displayName : ' GitHub release (edit)'
334
+ condition : succeededOrFailed()
335
+ inputs :
336
+ gitHubConnection : ' Github-MaggieKimani1'
337
+ action : edit
338
+ tagSource : userSpecifiedTag
339
+ tag : ' v$(artifactVersion)'
340
+ releaseNotesSource : inline
341
+ assets : ' $(Pipeline.Workspace)\**\*.exe'
342
+ addChangeLog : false
345
343
346
344
- deployment : deploy_docker_image
347
- environment : kiota- docker-images-releases
345
+ environment : docker-images-deploy
348
346
templateContext :
349
347
type : releaseJob
350
348
isProduction : true
@@ -358,16 +356,14 @@ extends:
358
356
pool :
359
357
vmImage : ' ubuntu-latest'
360
358
steps :
361
- # - checkout: self
362
-
363
359
- task : AzureCLI@2
364
360
displayName : ' Login to Azure Container Registry'
365
361
inputs :
366
- azureSubscription : ' ACR Push Test '
362
+ azureSubscription : ' ACR Images Push Service Connection '
367
363
scriptType : bash
368
364
scriptLocation : inlineScript
369
365
inlineScript : |
370
- az acr login --name msgraphpperegistry
366
+ az acr login --name msgraphprodregistry
371
367
372
368
- powershell : |
373
369
$content = [XML](Get-Content $(Pipeline.Workspace)/Directory.Build.props)
0 commit comments