90bcc51203
Add 3 pipeline files: - pipeline for build docker image sonic-slave-[buster|jessie|stretch] for amd64/armhf/arm64, and push to ACR(sonicdev-microsoft.com) - pipeline for build docker image sonic-mgmt, and push to ACR - pipeline for cleaning dpkg cache which are created more than 30 days. Co-authored-by: lguohan <lguohan@gmail.com>
58 lines
1.3 KiB
YAML
58 lines
1.3 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-mgmt image
|
|
|
|
schedules:
|
|
- cron: "0 8 * * *"
|
|
branches:
|
|
include:
|
|
- master
|
|
always: true
|
|
|
|
trigger: none
|
|
pr:
|
|
branches:
|
|
include:
|
|
- master
|
|
paths:
|
|
include:
|
|
- dockers/docker-sonic-mgmt
|
|
|
|
parameters:
|
|
- name: registry_url
|
|
type: string
|
|
default: sonicdev-microsoft.azurecr.io
|
|
- name: registry_conn
|
|
type: string
|
|
default: sonicdev
|
|
|
|
stages:
|
|
- stage: Build
|
|
jobs:
|
|
- job: Build
|
|
pool: sonicbld
|
|
timeoutInMinutes: 360
|
|
steps:
|
|
- template: cleanup.yml
|
|
- checkout: self
|
|
clean: true
|
|
submodules: recursive
|
|
- bash: |
|
|
set -xe
|
|
make configure PLATFORM=generic
|
|
make target/docker-sonic-mgmt.gz
|
|
docker load -i target/docker-sonic-mgmt.gz
|
|
docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest
|
|
env:
|
|
REGISTRY_SERVER: ${{ parameters.registry_url }}
|
|
displayName: Build docker-sonic-mgmt.gz
|
|
- task: Docker@2
|
|
displayName: Upload image
|
|
inputs:
|
|
containerRegistry: ${{ parameters.registry_conn }}
|
|
repository: docker-sonic-mgmt
|
|
command: push
|
|
tags: latest
|