Skip to content

Commit 410bfa6

Browse files
author
Evans Aboge (from Dev Box)
committed
Triger only docker_images deployment
1 parent dadca7c commit 410bfa6

File tree

1 file changed

+115
-114
lines changed

1 file changed

+115
-114
lines changed

.azure-pipelines/ci-build.yml

+115-114
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ trigger:
77
include:
88
- main
99
- support/v1
10+
- task/move-to-deploy-stage
1011
tags:
1112
include:
1213
- 'v*'
@@ -208,123 +209,123 @@ extends:
208209
os: linux
209210
image: ubuntu-latest
210211
jobs:
211-
- deployment: deploy_hidi
212-
condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
213-
templateContext:
214-
type: releaseJob
215-
isProduction: true
216-
inputs:
217-
- input: pipelineArtifact
218-
artifactName: Nugets
219-
targetPath: '$(Pipeline.Workspace)'
220-
dependsOn: []
221-
environment: nuget-org
222-
strategy:
223-
runOnce:
224-
deploy:
225-
pool:
226-
vmImage: ubuntu-latest
227-
steps:
228-
- task: 1ES.PublishNuget@1
229-
displayName: 'NuGet push'
230-
inputs:
231-
packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg'
232-
packageParentPath: '$(Pipeline.Workspace)'
233-
nuGetFeedType: external
234-
publishFeedCredentials: 'OpenAPI Nuget Connection'
212+
# - deployment: deploy_hidi
213+
# condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
214+
# templateContext:
215+
# type: releaseJob
216+
# isProduction: true
217+
# inputs:
218+
# - input: pipelineArtifact
219+
# artifactName: Nugets
220+
# targetPath: '$(Pipeline.Workspace)'
221+
# dependsOn: []
222+
# environment: nuget-org
223+
# strategy:
224+
# runOnce:
225+
# deploy:
226+
# pool:
227+
# vmImage: ubuntu-latest
228+
# steps:
229+
# - task: 1ES.PublishNuget@1
230+
# displayName: 'NuGet push'
231+
# inputs:
232+
# packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg'
233+
# packageParentPath: '$(Pipeline.Workspace)'
234+
# nuGetFeedType: external
235+
# publishFeedCredentials: 'OpenAPI Nuget Connection'
235236

236-
- deployment: deploy_lib
237-
condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
238-
templateContext:
239-
type: releaseJob
240-
isProduction: true
241-
inputs:
242-
- input: pipelineArtifact
243-
artifactName: Nugets
244-
targetPath: '$(Pipeline.Workspace)'
245-
dependsOn: []
246-
environment: nuget-org
247-
strategy:
248-
runOnce:
249-
deploy:
250-
pool:
251-
vmImage: ubuntu-latest
252-
steps:
253-
- powershell: |
254-
$fileNames = "$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.Workbench.*.nupkg"
255-
foreach($fileName in $fileNames) {
256-
if(Test-Path $fileName) {
257-
rm $fileName -Verbose
258-
}
259-
}
260-
displayName: remove other nupkgs to avoid duplication
261-
- task: 1ES.PublishNuget@1
262-
displayName: 'NuGet push'
263-
inputs:
264-
packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.*.nupkg'
265-
packageParentPath: '$(Pipeline.Workspace)'
266-
nuGetFeedType: external
267-
publishFeedCredentials: 'OpenAPI Nuget Connection'
237+
# - deployment: deploy_lib
238+
# condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
239+
# templateContext:
240+
# type: releaseJob
241+
# isProduction: true
242+
# inputs:
243+
# - input: pipelineArtifact
244+
# artifactName: Nugets
245+
# targetPath: '$(Pipeline.Workspace)'
246+
# dependsOn: []
247+
# environment: nuget-org
248+
# strategy:
249+
# runOnce:
250+
# deploy:
251+
# pool:
252+
# vmImage: ubuntu-latest
253+
# steps:
254+
# - powershell: |
255+
# $fileNames = "$(Pipeline.Workspace)/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg", "$(Pipeline.Workspace)/Microsoft.OpenApi.Workbench.*.nupkg"
256+
# foreach($fileName in $fileNames) {
257+
# if(Test-Path $fileName) {
258+
# rm $fileName -Verbose
259+
# }
260+
# }
261+
# displayName: remove other nupkgs to avoid duplication
262+
# - task: 1ES.PublishNuget@1
263+
# displayName: 'NuGet push'
264+
# inputs:
265+
# packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.*.nupkg'
266+
# packageParentPath: '$(Pipeline.Workspace)'
267+
# nuGetFeedType: external
268+
# publishFeedCredentials: 'OpenAPI Nuget Connection'
268269

269-
- deployment: deploy_yaml_reader
270-
condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
271-
templateContext:
272-
type: releaseJob
273-
isProduction: true
274-
inputs:
275-
- input: pipelineArtifact
276-
artifactName: Nugets
277-
targetPath: '$(Pipeline.Workspace)'
278-
dependsOn: deploy_lib
279-
environment: nuget-org
280-
strategy:
281-
runOnce:
282-
deploy:
283-
pool:
284-
vmImage: ubuntu-latest
285-
steps:
286-
- task: 1ES.PublishNuget@1
287-
displayName: 'NuGet push'
288-
inputs:
289-
packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg'
290-
packageParentPath: '$(Pipeline.Workspace)'
291-
nuGetFeedType: external
292-
publishFeedCredentials: 'OpenAPI Nuget Connection'
270+
# - deployment: deploy_yaml_reader
271+
# condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded())
272+
# templateContext:
273+
# type: releaseJob
274+
# isProduction: true
275+
# inputs:
276+
# - input: pipelineArtifact
277+
# artifactName: Nugets
278+
# targetPath: '$(Pipeline.Workspace)'
279+
# dependsOn: deploy_lib
280+
# environment: nuget-org
281+
# strategy:
282+
# runOnce:
283+
# deploy:
284+
# pool:
285+
# vmImage: ubuntu-latest
286+
# steps:
287+
# - task: 1ES.PublishNuget@1
288+
# displayName: 'NuGet push'
289+
# inputs:
290+
# packagesToPush: '$(Pipeline.Workspace)/Microsoft.OpenApi.YamlReader.*.nupkg'
291+
# packageParentPath: '$(Pipeline.Workspace)'
292+
# nuGetFeedType: external
293+
# publishFeedCredentials: 'OpenAPI Nuget Connection'
293294

294-
- deployment: create_github_release
295-
templateContext:
296-
type: releaseJob
297-
isProduction: true
298-
inputs:
299-
- input: pipelineArtifact
300-
artifactName: Nugets
301-
targetPath: '$(Pipeline.Workspace)'
302-
dependsOn: []
303-
environment: kiota-github-releases
304-
strategy:
305-
runOnce:
306-
deploy:
307-
pool:
308-
vmImage: ubuntu-latest
309-
steps:
310-
- pwsh: |
311-
$artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
312-
$artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
313-
#Set Variable $artifactName and $artifactVersion
314-
Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion"
315-
echo "$artifactVersion"
316-
displayName: 'Fetch Artifact Name'
317-
- task: GitHubRelease@1
318-
displayName: 'GitHub release (edit)'
319-
condition: succeededOrFailed()
320-
inputs:
321-
gitHubConnection: 'Github-MaggieKimani1'
322-
action: edit
323-
tagSource: userSpecifiedTag
324-
tag: 'v$(artifactVersion)'
325-
releaseNotesSource: inline
326-
assets: '$(Pipeline.Workspace)\**\*.exe'
327-
addChangeLog: false
295+
# - deployment: create_github_release
296+
# templateContext:
297+
# type: releaseJob
298+
# isProduction: true
299+
# inputs:
300+
# - input: pipelineArtifact
301+
# artifactName: Nugets
302+
# targetPath: '$(Pipeline.Workspace)'
303+
# dependsOn: []
304+
# environment: kiota-github-releases
305+
# strategy:
306+
# runOnce:
307+
# deploy:
308+
# pool:
309+
# vmImage: ubuntu-latest
310+
# steps:
311+
# - pwsh: |
312+
# $artifactName = Get-ChildItem -Path $(Pipeline.Workspace) -Filter Microsoft.OpenApi.*.nupkg -recurse | select -First 1
313+
# $artifactVersion= $artifactName.Name -replace "Microsoft.OpenApi.", "" -replace ".nupkg", ""
314+
# #Set Variable $artifactName and $artifactVersion
315+
# Write-Host "##vso[task.setvariable variable=artifactVersion; isSecret=false;]$artifactVersion"
316+
# echo "$artifactVersion"
317+
# displayName: 'Fetch Artifact Name'
318+
# - task: GitHubRelease@1
319+
# displayName: 'GitHub release (edit)'
320+
# condition: succeededOrFailed()
321+
# inputs:
322+
# gitHubConnection: 'Github-MaggieKimani1'
323+
# action: edit
324+
# tagSource: userSpecifiedTag
325+
# tag: 'v$(artifactVersion)'
326+
# releaseNotesSource: inline
327+
# assets: '$(Pipeline.Workspace)\**\*.exe'
328+
# addChangeLog: false
328329

329330
- deployment: deploy_docker_image
330331
environment: kiota-github-releases

0 commit comments

Comments
 (0)