[ci] Fix docker-sonic-slave-template issue for resources. (#10414)

Why I did it
Fix bug for wrong resources position.
This commit is contained in:
Shilong Liu 2022-04-01 16:19:48 +08:00 committed by GitHub
parent 13353dffe8
commit a9a37c8ba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 8 deletions

View File

@ -3,6 +3,13 @@
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
ref: master
endpoint: build
schedules:
- cron: "0 8 * * *"

View File

@ -3,6 +3,13 @@
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
ref: master
endpoint: build
schedules:
- cron: "0 8 * * *"

View File

@ -3,14 +3,6 @@
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
ref: master
endpoint: build
parameters:
- name: arch
type: string

View File

@ -3,6 +3,13 @@
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# Build and push sonic-slave-[buster|jessie|stretch] images for amd64/armhf/arm64
resources:
repositories:
- repository: buildimage
type: github
name: Azure/sonic-buildimage
ref: master
endpoint: build
schedules:
- cron: "0 8 * * *"
@ -53,8 +60,15 @@ stages:
- ${{ each dist in parameters.dists }}:
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
- ${{ each arch in parameters.arches }}:
${{ if eq(variables['System.PullRequest.TargetBranch'], 'master') }}:
- template: docker-sonic-slave-template.yml
parameters:
pool: sonicbld
arch: ${{ arch }}
dist: ${{ dist }}
${{ else }}:
- template: .azure-pipelines/docker-sonic-slave-template.yml@buildimage
parameters:
pool: sonicbld
arch: ${{ arch }}
dist: ${{ dist }}