mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 02:01:35 +00:00
Merge pull request #366 from resin-io/sort-files-in-base-image-md5
Use find and sort to make the base image hash more deterministic
This commit is contained in:
commit
7006f58267
@ -3,7 +3,10 @@ set -e
|
||||
|
||||
# Jenkins build steps
|
||||
export ESCAPED_BRANCH_NAME=$(echo $sourceBranch | sed 's/[^a-z0-9A-Z_.-]/-/g')
|
||||
BASE_IMAGE_VERSION=$(tar -c --mtime='1970-01-01' --owner=0 --group=0 -f - base-image | md5sum | awk -F " " '{print $1}')
|
||||
git submodule update --init --recursive
|
||||
git clean -fxd base-image
|
||||
git submodule foreach --recursive git clean -fxd
|
||||
BASE_IMAGE_VERSION=$(find base-image -print0 | LC_ALL=C sort -z | tar --null -cf - --no-recursion --mtime=@0 --owner=root --group=root --numeric-owner -T - | md5sum | awk -F " " '{print $1}')
|
||||
export BASE_IMAGE_REPO=resin/$ARCH-supervisor-base
|
||||
export BASE_IMAGE_TAG=resin/$ARCH-supervisor-base:$BASE_IMAGE_VERSION
|
||||
|
||||
|
@ -8,9 +8,6 @@ set -o pipefail
|
||||
|
||||
JENKINS_PERSISTENT_WORKDIR=${1:-/var/lib/yocto}
|
||||
DL_DIR="$JENKINS_PERSISTENT_WORKDIR/shared-downloads"
|
||||
|
||||
git submodule update --init --recursive
|
||||
rm -rf dest
|
||||
mkdir dest
|
||||
|
||||
BUILDER_REPO=registry.resinstaging.io/resin/${ARCH}-supervisor-base-builder
|
||||
|
Loading…
x
Reference in New Issue
Block a user