This commit is contained in:
parent
864e6078bc
commit
d6d12a0f80
@ -18,6 +18,14 @@ schedules:
|
||||
- 202006
|
||||
always: true
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: buildimage
|
||||
type: github
|
||||
name: Azure/sonic-buildimage
|
||||
ref: master
|
||||
endpoint: build
|
||||
|
||||
pool: sonicbld
|
||||
|
||||
parameters:
|
||||
@ -45,17 +53,7 @@ stages:
|
||||
jobFilters: ${{ parameters.jobFilters }}
|
||||
buildOptions: '${{ variables.VERSION_CONTROL_OPTIONS }} SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y'
|
||||
preSteps:
|
||||
- script: |
|
||||
containers=$(docker container ls | grep "sonic-slave" | awk '{ print $1 }')
|
||||
if [ ! -z "$containers" ]; then
|
||||
docker container kill $containers || true
|
||||
sleep 5
|
||||
fi
|
||||
images=$(docker images 'sonic-slave-*' -a -q)
|
||||
if [ ! -z "$images" ]; then
|
||||
docker rmi -f $images
|
||||
fi
|
||||
displayName: 'Cleanup sonic slave'
|
||||
- template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage
|
||||
- stage: UpgradeVersions
|
||||
jobs:
|
||||
- job: UpgradeVersions
|
||||
|
@ -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
|
||||
|
||||
parameters:
|
||||
- name: arch
|
||||
@ -38,6 +45,7 @@ jobs:
|
||||
pool: ${{ parameters.pool }}
|
||||
steps:
|
||||
- template: cleanup.yml
|
||||
- template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage
|
||||
- checkout: self
|
||||
clean: true
|
||||
submodules: recursive
|
||||
@ -68,16 +76,6 @@ jobs:
|
||||
BUILD_OPTIONS = 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
|
||||
fi
|
||||
|
||||
containers=$(docker container ls | grep "sonic-slave" | awk '{ print $1 }')
|
||||
if [ ! -z "$containers" ]; then
|
||||
docker container kill $containers || true
|
||||
sleep 5
|
||||
fi
|
||||
images=$(docker images 'sonic-slave-*' -a -q)
|
||||
if [ ! -z "$images" ]; then
|
||||
docker rmi -f $images
|
||||
fi
|
||||
|
||||
tmpfile=$(mktemp)
|
||||
|
||||
echo ${{ parameters.arch }} > .arch
|
||||
|
Loading…
Reference in New Issue
Block a user