From 209d39a2e626aa3a42fa5916f7a13e512392a006 Mon Sep 17 00:00:00 2001 From: Rafael Matias Date: Fri, 12 Jan 2024 13:09:50 +0100 Subject: [PATCH 1/2] pass COMMIT env var as build arg for lodestar --- config.yaml | 12 +++++++----- lodestar/build.sh | 9 +++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100755 lodestar/build.sh diff --git a/config.yaml b/config.yaml index ee67677..4a3e08c 100644 --- a/config.yaml +++ b/config.yaml @@ -117,12 +117,14 @@ - source: repository: chainsafe/lodestar ref: unstable + build_script: ./lodestar/build.sh target: tag: unstable repository: ethpandaops/lodestar - source: repository: chainsafe/lodestar ref: g11tech/verge + build_script: ./lodestar/build.sh target: tag: g11tech-verge repository: ethpandaops/lodestar @@ -203,7 +205,7 @@ ############# # flashbots # ############# -- source: +- source: repository: flashbots/builder ref: main target: @@ -212,7 +214,7 @@ ############# # tx-fuzz # ############# -- source: +- source: repository: MariusVanDerWijden/tx-fuzz ref: master target: @@ -221,7 +223,7 @@ ############## # goomy-blob # ############## -- source: +- source: repository: ethpandaops/goomy-blob ref: master target: @@ -230,7 +232,7 @@ ############################## # ethereum-genesis-generator # ############################## -- source: +- source: repository: ethpandaops/ethereum-genesis-generator ref: master target: @@ -257,7 +259,7 @@ ############# # armiarma # ############# -- source: +- source: repository: migalabs/armiarma ref: master target: diff --git a/lodestar/build.sh b/lodestar/build.sh new file mode 100755 index 0000000..8dd8850 --- /dev/null +++ b/lodestar/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +cd ${SCRIPT_DIR}/../source + +docker build --build-arg COMMIT="${source_git_commit_hash}" -t "${target_repository}:${target_tag}" . +docker push "${target_repository}:${target_tag}" +docker tag "${target_repository}:${target_tag}" "${target_repository}:${target_tag}-${source_git_commit_hash}" +docker push "${target_repository}:${target_tag}-${source_git_commit_hash}" From 0fa9446343115faa9480b24117d08c72241e790a Mon Sep 17 00:00:00 2001 From: Rafael Matias Date: Fri, 12 Jan 2024 13:11:35 +0100 Subject: [PATCH 2/2] fixup quotes for build arg --- lodestar/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodestar/build.sh b/lodestar/build.sh index 8dd8850..aa901e2 100755 --- a/lodestar/build.sh +++ b/lodestar/build.sh @@ -3,7 +3,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd ${SCRIPT_DIR}/../source -docker build --build-arg COMMIT="${source_git_commit_hash}" -t "${target_repository}:${target_tag}" . +docker build --build-arg "COMMIT=${source_git_commit_hash}" -t "${target_repository}:${target_tag}" . docker push "${target_repository}:${target_tag}" docker tag "${target_repository}:${target_tag}" "${target_repository}:${target_tag}-${source_git_commit_hash}" docker push "${target_repository}:${target_tag}-${source_git_commit_hash}"