Skip to content

Commit 5b2b951

Browse files
committed
ci: updates pipelines with latest definitions
Signed-off-by: Vincent Biret <[email protected]>
1 parent 9ff9789 commit 5b2b951

File tree

3 files changed

+37
-29
lines changed

3 files changed

+37
-29
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
55
trigger:
66
branches:
77
include:
8-
- master
9-
- vnext
8+
- main
9+
- dev
10+
- support/v1
1011
pr:
1112
branches:
1213
include:
13-
- master
14-
- vnext
14+
- main
15+
- dev
16+
- support/v1
1517
variables:
1618
buildPlatform: 'Any CPU'
1719
buildConfiguration: 'Release'
@@ -206,10 +208,17 @@ extends:
206208
content: '*.nupkg'
207209

208210
- stage: deploy
209-
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/master'), succeeded())
211+
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'),contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
210212
dependsOn: build
211213
jobs:
212214
- deployment: deploy_hidi
215+
templateContext:
216+
type: releaseJob
217+
isProduction: true
218+
inputs:
219+
- input: pipelineArtifact
220+
artifactName: Nugets
221+
targetPath: '$(Pipeline.Workspace)'
213222
dependsOn: []
214223
environment: nuget-org
215224
strategy:
@@ -218,11 +227,6 @@ extends:
218227
pool:
219228
vmImage: ubuntu-latest
220229
steps:
221-
- task: DownloadPipelineArtifact@2
222-
displayName: Download nupkg from artifacts
223-
inputs:
224-
artifact: Nugets
225-
source: current
226230
- task: DownloadPipelineArtifact@2
227231
displayName: Download hidi executable from artifacts
228232
inputs:
@@ -264,6 +268,13 @@ extends:
264268
]'
265269

266270
- deployment: deploy_lib
271+
templateContext:
272+
type: releaseJob
273+
isProduction: true
274+
inputs:
275+
- input: pipelineArtifact
276+
artifactName: Nugets
277+
targetPath: '$(Pipeline.Workspace)'
267278
dependsOn: []
268279
environment: nuget-org
269280
strategy:
@@ -272,11 +283,6 @@ extends:
272283
pool:
273284
vmImage: ubuntu-latest
274285
steps:
275-
- task: DownloadPipelineArtifact@2
276-
displayName: Download nupkg from artifacts
277-
inputs:
278-
artifact: Nugets
279-
source: current
280286
- powershell: |
281287
$fileNames = "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Hidi.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Readers.*.nupkg", "$(Pipeline.Workspace)/Nugets/Microsoft.OpenApi.Workbench.*.nupkg"
282288
foreach($fileName in $fileNames) {
@@ -294,6 +300,13 @@ extends:
294300
publishFeedCredentials: 'OpenAPI Nuget Connection'
295301

296302
- deployment: deploy_readers
303+
templateContext:
304+
type: releaseJob
305+
isProduction: true
306+
inputs:
307+
- input: pipelineArtifact
308+
artifactName: Nugets
309+
targetPath: '$(Pipeline.Workspace)'
297310
dependsOn: deploy_lib
298311
environment: nuget-org
299312
strategy:
@@ -302,11 +315,6 @@ extends:
302315
pool:
303316
vmImage: ubuntu-latest
304317
steps:
305-
- task: DownloadPipelineArtifact@2
306-
displayName: Download nupkg from artifacts
307-
inputs:
308-
artifact: Nugets
309-
source: current
310318
- task: 1ES.PublishNuget@1
311319
displayName: 'NuGet push'
312320
inputs:

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CodeQL Analysis
22

33
on:
44
push:
5-
branches: [ vnext ]
5+
branches: [ main, dev ]
66
pull_request:
77
schedule:
88
- cron: '0 8 * * *'

.github/workflows/docker.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish Docker image
22
on:
33
workflow_dispatch:
44
push:
5-
branches: [master, vnext]
5+
branches: [main, dev, support/v1]
66
paths: ['src/Microsoft.OpenApi.Hidi/**', '.github/workflows/**']
77
env:
88
REGISTRY: msgraphprod.azurecr.io
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- name: Check out the repo
1818
uses: actions/checkout@v4
19-
- name: Login to GitHub package feed
19+
- name: Login to registry
2020
uses: docker/[email protected]
2121
with:
2222
username: ${{ secrets.ACR_USERNAME }}
@@ -28,15 +28,15 @@ jobs:
2828
echo "::set-output name=version::${version}"
2929
shell: pwsh
3030
id: getversion
31-
- name: Push to GitHub Packages - Nightly
32-
if: ${{ github.ref == 'refs/heads/vnext' }}
33-
uses: docker/build-push-action@v6.7.0
31+
- name: Push to registry - Nightly
32+
if: ${{ github.ref == 'refs/heads/dev' }}
33+
uses: docker/build-push-action@v6.10.0
3434
with:
3535
push: true
3636
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
37-
- name: Push to GitHub Packages - Release
38-
if: ${{ github.ref == 'refs/heads/master' }}
39-
uses: docker/build-push-action@v6.7.0
37+
- name: Push to registry - Release
38+
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/support/v1' }}
39+
uses: docker/build-push-action@v6.10.0
4040
with:
4141
push: true
4242
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.getversion.outputs.version }}

0 commit comments

Comments
 (0)