55a707586b
* Support SONiC reproduceable build for deb/py2/py3/web * Remove j2 files * Fix bug * Fix some issues 1. Change some code format issues 2. Fix curl calling wget command, pip2 calling pip3 issue 3. Fix wget/curl downloading multiple urls issue * Fix some code format issue * Fix bug * Fix bug * Fix command path hard code in build info scripts issue * Add debian package sonic-build-tools * Fix auto debian package removed issue * Change build debian package name, and change the folder * Collect the pre-versions and post-versions * Change to use debian:buster * Remove apt-mark and improve code * Remove set_build_hooks * Change docker trusted gpg files * Fix docker build COPY directory name issue * Move the trusted gpg files into the sonic-build-hooks package
29 lines
832 B
Bash
Executable File
29 lines
832 B
Bash
Executable File
#!/bin/bash
|
|
|
|
RET=$1
|
|
BLDENV=$2
|
|
TARGET_PATH=$3
|
|
|
|
TIMESTAMP=$(date +"%Y%m%d%H%M%S")
|
|
. /usr/local/share/buildinfo/scripts/buildinfo_base.sh
|
|
|
|
[ -z "$BLDENV" ] && BLDENV=$(grep VERSION_CODENAME /etc/os-release | cut -d= -f2)
|
|
[ -z "$BLDENV" ] && exit $RET
|
|
|
|
[ -z "$TARGET_PATH" ] && TARGET_PATH=./target
|
|
|
|
VERSION_BUILD_PATH=$TARGET_PATH/versions/build
|
|
VERSION_SLAVE_PATH=$VERSION_BUILD_PATH/build-sonic-slave-${BLDENV}
|
|
LOG_VERSION_PATH=$VERSION_BUILD_PATH/log-${TIMESTAMP}
|
|
|
|
sudo chmod -R a+rw $BUILDINFO_PATH
|
|
collect_version_files $LOG_VERSION_PATH
|
|
([ -d $BUILD_VERSION_PATH ] && [ ! -z "$(ls $BUILD_VERSION_PATH/)" ]) && cp -rf $BUILD_VERSION_PATH/* $LOG_VERSION_PATH/
|
|
mkdir -p $VERSION_SLAVE_PATH
|
|
|
|
scripts/versions_manager.py merge -t $VERSION_SLAVE_PATH -b $LOG_VERSION_PATH -e $POST_VERSION_PATH
|
|
|
|
rm -rf $BUILD_VERSION_PATH/*
|
|
|
|
exit $RET
|