[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible_debian_live_build: Some documentation for the date manipulations

Holger Levsen (@holger) gitlab at salsa.debian.org
Sat Aug 28 14:47:16 BST 2021



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
0ceafc21 by Roland Clobus at 2021-08-28T15:46:36+02:00
reproducible_debian_live_build: Some documentation for the date manipulations

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_debian_live_build.sh


Changes:

=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -86,7 +86,20 @@ popd
 export LB_OUTPUT=${RESULTSDIR}/lb_output.txt
 # Use the timestamp of the latest mirror snapshot
 wget https://debian.notset.fr/snapshot/mr/timestamp/debian/latest --output-document ${RESULTSDIR}/latest
+#
+# Extract the timestamp from the JSON file
+#
+# Input:
+# {
+#   "_api": "0.3",
+#   "_comment": "notset",
+#   "result": "20210828T083909Z"
+# }
+# Output:
+# 20210828T083909Z
+#
 export SNAPSHOT_TIMESTAMP=$(cat ${RESULTSDIR}/latest | awk '/"result":/ { split($0, a, "\""); print a[4] }')
+# Convert SNAPSHOT_TIMESTAMP to Unix time (insert suitable formatting first)
 export SOURCE_DATE_EPOCH=$(date -d $(echo ${SNAPSHOT_TIMESTAMP} | awk '{ printf "%s-%s-%sT%s:%s:%sZ", substr($0,1,4), substr($0,5,2), substr($0,7,2), substr($0,10,2), substr($0,12,2), substr($0,14,2) }') +%s)
 export MIRROR=http://debian.notset.fr/snapshot/archive/debian/${SNAPSHOT_TIMESTAMP}
 output_echo "Info: using the snapshot from ${SOURCE_DATE_EPOCH} (${SNAPSHOT_TIMESTAMP})"



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/0ceafc214d5b9ddbb4c697f2f2562f9ef5855b9f

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/0ceafc214d5b9ddbb4c697f2f2562f9ef5855b9f
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20210828/37895be5/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list