Skip to content

Commit 4ff7335

Browse files
authored
feat(ci): add workflow to build and push ere-server-zisk docker image (#327)
Introduce a new GitHub Actions workflow (`build-push-ere-server-zisk.yml`) to automate the building and pushing of the `ere-server-zisk` Docker image across multiple platforms. This is done to standardize the CI/CD process for this specific client, mirroring existing workflows for other components. The workflow includes preparation, platform-specific deployment steps using `ere-server-zisk/build.sh`, manifest generation, and failure notifications. Configuration files (`README.md`, `branches.yaml`, `platforms.yaml`, `generate_config.py`) are updated to support the new client.
1 parent b70cba5 commit 4ff7335

6 files changed

Lines changed: 156 additions & 0 deletions

File tree

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Build ere-server-zisk docker image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
repository:
7+
description: The source ere repository to build from
8+
default: eth-act/ere
9+
type: string
10+
required: true
11+
ref:
12+
description: The branch, tag or SHA to checkout and build from
13+
default: master
14+
type: string
15+
required: true
16+
docker_tag:
17+
description: Override target docker tag (defaults to the above source ref if left blank)
18+
type: string
19+
required: false
20+
21+
jobs:
22+
prepare:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
platforms: ${{ steps.setup.outputs.platforms }}
26+
target_tag: ${{ steps.tag.outputs.docker_tag }}
27+
steps:
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
- name: Prepare Matrix
30+
id: setup
31+
uses: ./.github/actions/prepare
32+
with:
33+
client: 'ere-server-zisk'
34+
- name: Generate target tag
35+
id: tag
36+
uses: ./.github/actions/docker-tag
37+
with:
38+
input: ${{ inputs.docker_tag || inputs.ref }}
39+
repository: ${{ inputs.repository }}
40+
upstream_repository: eth-act/ere
41+
deploy:
42+
needs:
43+
- prepare
44+
runs-on: ${{ matrix.runner }}
45+
continue-on-error: true
46+
strategy:
47+
matrix:
48+
include: ${{fromJson(needs.prepare.outputs.platforms)}}
49+
outputs:
50+
git_commit_hash: ${{ steps.set_output.outputs.git_commit_hash }}
51+
steps:
52+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
53+
- uses: ./.github/actions/install-deps
54+
with:
55+
repository: ${{ inputs.repository }}
56+
- uses: ./.github/actions/deploy
57+
id: deploy
58+
with:
59+
source_repository: ${{ inputs.repository }}
60+
source_ref: ${{ inputs.ref }}
61+
target_tag: ${{ needs.prepare.outputs.target_tag }}-${{ matrix.slug }}
62+
target_repository: ethpandaops/ere-server-zisk
63+
platform: ${{ matrix.platform }}
64+
build_script: ./ere-server-zisk/build.sh
65+
66+
DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
67+
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
68+
MACOS_PASSWORD: "${{ secrets.MACOS_PASSWORD }}"
69+
GOPROXY: "${{ vars.GOPROXY }}"
70+
HARBOR_USERNAME: "${{ vars.HARBOR_USERNAME }}"
71+
HARBOR_PASSWORD: "${{ secrets.HARBOR_PASSWORD }}"
72+
harbor_registry: ${{ vars.HARBOR_REGISTRY }}
73+
74+
- name: Set job output
75+
id: set_output
76+
run: echo "git_commit_hash=${{ steps.deploy.outputs.git_commit_hash }}" >> $GITHUB_OUTPUT
77+
shell: bash
78+
manifest:
79+
needs:
80+
- prepare
81+
- deploy
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
85+
- uses: ./.github/actions/manifest
86+
with:
87+
source_repository: ${{ inputs.repository }}
88+
source_ref: ${{ inputs.ref }}
89+
target_tag: ${{ needs.prepare.outputs.target_tag }}
90+
target_repository: ethpandaops/ere-server-zisk
91+
platforms: ${{ needs.prepare.outputs.platforms }}
92+
harbor_registry: ${{ vars.HARBOR_REGISTRY }}
93+
HARBOR_USERNAME: "${{ vars.HARBOR_USERNAME }}"
94+
HARBOR_PASSWORD: "${{ secrets.HARBOR_PASSWORD }}"
95+
git_commit_hash: ${{ needs.deploy.outputs.git_commit_hash }}
96+
DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
97+
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
98+
notify:
99+
name: Discord Notification
100+
runs-on: ubuntu-latest
101+
needs:
102+
- prepare
103+
- deploy
104+
- manifest
105+
if: failure()
106+
steps:
107+
- name: Notify
108+
uses: nobrayner/discord-webhook@1766a33bf571acdcc0678f00da4fb83aad01ebc7 # v1
109+
with:
110+
github-token: ${{ secrets.github_token }}
111+
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Run the *Build **tooling*** workflow;
3737
- [Build mev-rs](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-mev-rs.yml) [[source](https://github.com/ralexstokes/mev-rs)]
3838
- [Build reth-rbuilder](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-reth-rbuilder.yml) [[source](https://github.com/flashbots/rbuilder)]
3939
- [Build Syncoor](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-syncoor.yml) [[source](https://github.com/ethpandaops/syncoor)]
40+
- [Build ere-server-zisk](https://github.com/ethpandaops/eth-client-docker-image-builder/actions/workflows/build-push-ere-server-zisk.yml) [[source](https://github.com/eth-act/ere)]
4041

4142
## Adding a new image to build on schedule
4243

branches.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ nevermind:
211211
ref: "master"
212212
tag: "master-bad-iszero"
213213

214+
ere-server-zisk:
215+
branches:
216+
- master
217+
214218
fuzztools:
215219
branches:
216220
- main

ere-server-zisk/build.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
5+
cd ${SCRIPT_DIR}/../source
6+
7+
CUDA_ARCH="${CUDA_ARCH:-sm_120}"
8+
9+
echo "Building ere-server-zisk with CUDA (arch: ${CUDA_ARCH})"
10+
11+
echo "Stage 1/3: Building ere-base image..."
12+
docker build \
13+
--build-arg CUDA=1 \
14+
-f docker/Dockerfile.base \
15+
-t ere-base:local \
16+
.
17+
18+
echo "Stage 2/3: Building ere-base-zisk image..."
19+
docker build \
20+
--build-arg BASE_IMAGE=ere-base:local \
21+
--build-arg CUDA=1 \
22+
--build-arg CUDA_ARCH="${CUDA_ARCH}" \
23+
-f docker/zisk/Dockerfile.base \
24+
-t ere-base-zisk:local \
25+
.
26+
27+
echo "Stage 3/3: Building ere-server-zisk image..."
28+
docker build \
29+
--build-arg BASE_ZKVM_IMAGE=ere-base-zisk:local \
30+
--build-arg CUDA=1 \
31+
-f docker/zisk/Dockerfile.server \
32+
-t "${target_repository}:${target_tag}" \
33+
-t "${target_repository}:${target_tag}-${source_git_commit_hash}" \
34+
.
35+
36+
docker push "${target_repository}:${target_tag}"
37+
docker push "${target_repository}:${target_tag}-${source_git_commit_hash}"

generate_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
'consensoor': 'ethpandaops/consensoor',
4242
'meth': 'ethereum/go-ethereum',
4343
'nevermind': 'nethermindeth/nethermind',
44+
'ere-server-zisk': 'eth-act/ere',
4445
'fuzztools': 'protocol-security/fuzztools',
4546
# Add more defaults as needed
4647
}

platforms.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ meth:
114114
nevermind:
115115
- linux/amd64
116116
- linux/arm64
117+
ere-server-zisk:
118+
- linux/amd64
117119
fuzztools:
118120
- linux/amd64
119121
- linux/arm64

0 commit comments

Comments
 (0)