File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ $(OUTPUTDIR)/%.tar.zst:
1414
1515.PRECIOUS : $(OUTPUTDIR ) /Dockerfile.%
1616$(OUTPUTDIR ) /Dockerfile.% : $(OUTPUTDIR ) /% .tar.zst
17- scripts/make-dockerfile.sh " $( * ) .tar.zst" $(* ) $(OUTPUTDIR ) " true" " Dev"
17+ scripts/make-dockerfile.sh " $( * ) .tar.zst" $(* ) $(OUTPUTDIR ) " true" " Dev" $( SOURCE_DATE_EPOCH )
1818
1919# The following is for local builds only, it is not used by the CI/CD pipeline
2020
Original file line number Diff line number Diff line change @@ -7,16 +7,24 @@ declare -r GROUP="$2"
77declare -r OUTPUTDIR=" $3 "
88declare -r DOWNLOAD=" $4 "
99declare -r TITLE=" $5 "
10+ declare -rx SOURCE_DATE_EPOCH=" $6 "
1011
1112# Do not use these directly in the sed below - it will mask git failures
1213BUILD_VERSION=" ${BUILD_VERSION:- dev} "
1314CI_COMMIT_SHA=" ${CI_COMMIT_SHA:- $(git rev-parse HEAD)} "
1415
16+ # Honor SOURCE_DATE_EPOCH for the repro GROUP
17+ if [ " $GROUP " = " repro" ]; then
18+ CREATED_TIMESTAMP=$( date -u -d " @$SOURCE_DATE_EPOCH " +%Y-%m-%dT%H:%M:%SZ)
19+ else
20+ CREATED_TIMESTAMP=$( date -Is)
21+ fi
22+
1523sed -e " s|TEMPLATE_ROOTFS_FILE|$ROOTFS_FILE |" \
1624 -e " s|TEMPLATE_ROOTFS_DOWNLOAD|$DOWNLOAD |" \
1725 -e " s|TEMPLATE_ROOTFS_HASH|$( cat $OUTPUTDIR /$ROOTFS_FILE .SHA256) |" \
1826 -e " s|TEMPLATE_TITLE|Arch Linux $TITLE Image|" \
1927 -e " s|TEMPLATE_VERSION_ID|$BUILD_VERSION |" \
2028 -e " s|TEMPLATE_REVISION|$CI_COMMIT_SHA |" \
21- -e " s|TEMPLATE_CREATED|$( date -Is ) |" \
29+ -e " s|TEMPLATE_CREATED|$CREATED_TIMESTAMP |" \
2230 Dockerfile.template > " $OUTPUTDIR /Dockerfile.$GROUP "
You can’t perform that action at this time.
0 commit comments