commit e6c74d4af2edfca70bb0945695a66ecebf9cdb47 parent 02061b7ef3dde0d0d45801cd761712726f0e6f6d Author: Devan Carpenter <devan@taler.net> Date: Sat, 17 Feb 2024 12:03:10 -0500 ci: update tags for head by fetching commit shas This makes podman caching work correctly. If the sha hash hasn't changed then cache will be used, and if it has changed, then that component will be built. Diffstat:
| M | contrib/ci/jobs/1-build-head/build.sh | | | 4 | +--- |
| A | contrib/ci/jobs/1-build-head/update-tags.sh | | | 22 | ++++++++++++++++++++++ |
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/contrib/ci/jobs/1-build-head/build.sh b/contrib/ci/jobs/1-build-head/build.sh @@ -1,9 +1,7 @@ #!/bin/bash set -exuo pipefail -for i in buildconfig/*.tag ; do - echo "master" > "$i" -done +./contrib/ci/jobs/1-build-head/update-tags.sh ./sandcastle-build diff --git a/contrib/ci/jobs/1-build-head/update-tags.sh b/contrib/ci/jobs/1-build-head/update-tags.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -ex + +fetch_head() { + git ls-remote -q -h "${1}" master | cut -f1 +} + +GNUNET_HEAD=$(fetch_head "git://git.gnunet.org/gnunet") +EXCHANGE_HEAD=$(fetch_head "git://git.taler.net/exchange") +MERCHANT_HEAD=$(fetch_head "git://git.taler.net/merchant") +LIBEUFIN_HEAD=$(fetch_head "git://git.taler.net/libeufin") +MERCHANT_DEMOS_HEAD=$(fetch_head "git://git.taler.net/taler-merchant-demos") +WALLET_HEAD=$(fetch_head "git://git.taler.net/wallet-core") +SYNC_HEAD=$(fetch_head "git://git.taler.net/sync") + +echo $GNUNET_HEAD > buildconfig/gnunet.tag +echo $EXCHANGE_HEAD > buildconfig/exchange.tag +echo $MERCHANT_HEAD > buildconfig/merchant.tag +echo $LIBEUFIN_HEAD > buildconfig/libeufin.tag +echo $MERCHANT_DEMOS_HEAD > buildconfig/merchant-demos.tag +echo $WALLET_HEAD > buildconfig/wallet.tag +echo $SYNC_HEAD > buildconfig/sync.tag