sonic-buildimage/.azure-pipelines/docker-sonic-slave.yml
Liu Shilong cd16fc0b84
Fix sonic slave pipeline to set correct tag on sonic slave image. (#13177) (#13187)
Why I did it
Currently sonic-slave-* tag is confusing. Set correct tag on sonic-slave-* image.
Fix job name to fit the build.

How I did it
build amd image in amd64:
sonic-slave-bullseye:cfe29bff67c
sonic-slave-bullseye:latest
sonic-slave-bullseye:master

build armhf image in amd64:
sonic-slave-bullseye-march-armhf:33614806dc3
sonic-slave-bullseye-march-armhf:latest
sonic-slave-bullseye-march-armhf:master

build arm64 image in amd64:
sonic-slave-bullseye-march-arm64:f3b1b16c801
sonic-slave-bullseye-march-arm64:latest
sonic-slave-bullseye-march-arm64:master

build arm64 image in arm64:
sonic-slave-bullseye:75cb326c9a7
sonic-slave-bullseye-arm64:latest
sonic-slave-bullseye:master

build armhf image in armhf:
sonic-slave-bullseye:64d178951fc
sonic-slave-bullseye-armhf:latest
sonic-slave-bullseye:master

How to verify it
2022-12-28 16:34:12 +08:00

84 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-*
- files/build/versions
- Makefile
- Makefile.work
parameters:
- name: 'arches'
type: object
default:
- amd64
- armhf
- arm64
- name: 'dists'
type: object
default:
- bullseye
- buster
- stretch
- jessie
- name: registry_url
type: string
default: sonicdev-microsoft.azurecr.io
- name: registry_conn
type: string
default: sonicdev
stages:
- stage: Build_in_amd64
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 }}
${{ if ne(arch, 'amd64') }}:
march: _march_${{ arch }}
- stage: Build_native_arm
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: _${{ arch }}