Skip to content

Commit 2c867d2

Browse files
Savidbarnabasbusa
andauthored
feat(lighthouse): add xatu-sidecar build (#279)
Co-authored-by: Barnabas Busa <[email protected]>
1 parent f04e20e commit 2c867d2

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

generate_config.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
'nimbus-eth2'
6262
]
6363

64+
# Clients that need to have xatu sidecar builds created automatically
65+
SIDECAR_VARIANTS = [
66+
'lighthouse'
67+
]
68+
6469
def generate_config():
6570
# Read the simplified branches configuration
6671
with open('branches.yaml', 'r') as f:
@@ -102,6 +107,14 @@ def generate_config():
102107
elif branch_spec == 'unstable':
103108
process_branch(client_name, default_repo, branch_spec, "xatu-sentry-unstable", config_list)
104109

110+
# Auto-generate xatu sidecar builds if needed
111+
if client_name in SIDECAR_VARIANTS:
112+
if branch_spec == 'unstable':
113+
process_branch(client_name, default_repo, branch_spec, "xatu-sidecar-unstable", config_list)
114+
elif 'devnet' in branch_spec:
115+
# For devnet branches, append -xatu-sidecar to the safe branch name
116+
process_branch(client_name, default_repo, branch_spec, f"{safe_branch_name}-xatu-sidecar", config_list)
117+
105118
# Process alternate repositories if they exist
106119
if 'alt_repos' in client_config:
107120
for alt_repo, branches in client_config['alt_repos'].items():
@@ -209,6 +222,8 @@ def get_build_script(client_name, branch, target_tag=None):
209222
return f"./{client_name}/xatu-sentry.sh"
210223
elif client_name == 'nimbus-eth2' and target_tag and 'xatu-sentry' in target_tag:
211224
return f"./{client_name}/xatu-sentry.sh"
225+
elif client_name == 'lighthouse' and target_tag and 'xatu-sidecar' in target_tag:
226+
return f"./{client_name}/xatu-sidecar.sh"
212227
elif client_name == 'besu':
213228
return "./besu/build.sh"
214229
elif client_name == 'lodestar':

lighthouse/xatu-sidecar.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /bin/bash
2+
3+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
4+
cd ${SCRIPT_DIR}/..
5+
6+
git clone https://github.com/ethpandaops/dimhouse.git
7+
8+
cd dimhouse
9+
echo "dimhouse commit hash: $(git rev-parse HEAD)"
10+
./apply-dimhouse-patch.sh ${source_repository} ${source_ref} ../source
11+
12+
cd ../source
13+
14+
docker build -t "${target_repository}:${target_tag}" -t "${target_repository}:${target_tag}-${source_git_commit_hash}" .
15+
docker push "${target_repository}:${target_tag}"
16+
docker push "${target_repository}:${target_tag}-${source_git_commit_hash}"

0 commit comments

Comments
 (0)