[build] Fix issues found in reproducible build. (#10407)
This commit is contained in:
parent
d8b80d2317
commit
8f01c7fba6
@ -51,7 +51,7 @@ stages:
|
|||||||
- template: azure-pipelines-build.yml
|
- template: azure-pipelines-build.yml
|
||||||
parameters:
|
parameters:
|
||||||
jobFilters: ${{ parameters.jobFilters }}
|
jobFilters: ${{ parameters.jobFilters }}
|
||||||
buildOptions: '${{ variables.VERSION_CONTROL_OPTIONS }} SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y'
|
buildOptions: '${{ variables.VERSION_CONTROL_OPTIONS }} ENABLE_DOCKER_BASE_PULL=n SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y'
|
||||||
preSteps:
|
preSteps:
|
||||||
- template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage
|
- template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage
|
||||||
- stage: UpgradeVersions
|
- stage: UpgradeVersions
|
||||||
|
@ -23,7 +23,7 @@ tag=`echo $image_tag | cut -f2 -d:`
|
|||||||
|
|
||||||
if [[ ",$SONIC_VERSION_CONTROL_COMPONENTS," == *,all,* ]] || [[ ",$SONIC_VERSION_CONTROL_COMPONENTS," == *,docker,* ]]; then
|
if [[ ",$SONIC_VERSION_CONTROL_COMPONENTS," == *,all,* ]] || [[ ",$SONIC_VERSION_CONTROL_COMPONENTS," == *,docker,* ]]; then
|
||||||
# if docker image not in white list, exit
|
# if docker image not in white list, exit
|
||||||
if [[ "$image_tag" != */debian:* ]] && [[ "$image_tag" != multiarch/debian-debootstrap:* ]];then
|
if [[ "$image_tag" != */debian:* ]] && [[ "$image_tag" != debian:* ]] && [[ "$image_tag" != multiarch/debian-debootstrap:* ]];then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ -f $version_file ];then
|
if [ -f $version_file ];then
|
||||||
@ -40,7 +40,7 @@ if [[ ",$SONIC_VERSION_CONTROL_COMPONENTS," == *,all,* ]] || [[ ",$SONIC_VERSION
|
|||||||
sed -i "s/$oldimage/$newimage/" $DOCKERFILE
|
sed -i "s/$oldimage/$newimage/" $DOCKERFILE
|
||||||
else
|
else
|
||||||
hash_value=`docker pull $image_tag 2> ${new_version_file}.log | grep Digest | awk '{print$2}'`
|
hash_value=`docker pull $image_tag 2> ${new_version_file}.log | grep Digest | awk '{print$2}'`
|
||||||
if [ -z hash_value ];then
|
if [ -z "$hash_value" ];then
|
||||||
hash_value=unknown
|
hash_value=unknown
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user