sonic-buildimage/.azure-pipelines/docker-sonic-slave.yml
Liu Shilong a00773a6ec
[ci] Update docker sonic slave pipeline to build slave base docker (#11908) (#12405)
* [ci] Update docker sonic slave pipeline to build slave base docker
2022-10-18 13:53:43 +08:00

82 lines
1.9 KiB
YAML

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# 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: sonic-net/sonic-buildimage
ref: master
endpoint: sonic-net
schedules:
- cron: "0 0 * * 0"
displayName: Weekly build
branches:
include:
- master
- 202???
always: true
pr: none
trigger:
batch: true
branches:
include:
- master
- 202???
paths:
include:
- sonic-slave-*
- src/sonic-build-hooks
- files/build/versions
- Makefile
- Makefile.work
parameters:
- name: 'arches'
type: object
default:
- amd64
- armhf
- arm64
- name: 'dists'
type: object
default:
- buster
- stretch
- jessie
- name: registry_url
type: string
default: sonicdev-microsoft.azurecr.io
- name: registry_conn
type: string
default: sonicdev
stages:
- stage: Build
jobs:
- ${{ each dist in parameters.dists }}:
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
- ${{ each arch in parameters.arches }}:
- template: .azure-pipelines/docker-sonic-slave-template.yml@buildimage
parameters:
pool: sonicbld
arch: ${{ arch }}
dist: ${{ dist }}
- stage: Build_march
dependsOn: []
jobs:
- ${{ each dist in parameters.dists }}:
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
- ${{ each arch in parameters.arches }}:
- ${{ if ne(arch, 'amd64') }}:
- template: .azure-pipelines/docker-sonic-slave-template.yml@buildimage
parameters:
pool: sonicbld-${{ arch }}
arch: ${{ arch }}
dist: ${{ dist }}
march: march_