Skip to content

Commit

Permalink
Build bridge tool docker
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed Apr 30, 2024
1 parent 560263a commit 70aff97
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
target/release/permissionless-builder
target/release/nasty-client
target/release/pub-key
target/release/bridge
build-arm:
runs-on: buildjet-4vcpu-ubuntu-2204-arm
Expand Down Expand Up @@ -117,6 +118,7 @@ jobs:
target/release/permissionless-builder
target/release/nasty-client
target/release/pub-key
target/release/bridge
build-dockers:
runs-on: ubuntu-latest
Expand All @@ -134,6 +136,7 @@ jobs:
deploy-tag: ${{ steps.deploy.outputs.tags }}
builder-tag: ${{ steps.builder.outputs.tags }}
nasty-client-tag: ${{ steps.nasty-client.outputs.tags }}
bridge-tag: ${{ steps.bridge.outputs.tags }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -235,6 +238,12 @@ jobs:
with:
images: ghcr.io/espressosystems/espresso-sequencer/nasty-client

- name: Generate bridge metadata
uses: docker/metadata-action@v5
id: bridge
with:
images: ghcr.io/espressosystems/espresso-sequencer/bridge

- name: Build and push sequencer docker
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -355,6 +364,16 @@ jobs:
tags: ${{ steps.nasty-client.outputs.tags }}
labels: ${{ steps.nasty-client.outputs.labels }}

- name: Build and push bridge docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/bridge.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.bridge.outputs.tags }}
labels: ${{ steps.bridge.outputs.labels }}

test-demo:
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -382,6 +401,7 @@ jobs:
docker pull ${{ needs.build-dockers.outputs.deploy-tag }}
docker pull ${{ needs.build-dockers.outputs.builder-tag }}
docker pull ${{ needs.build-dockers.outputs.nasty-client-tag }}
docker pull ${{ needs.build-dockers.outputs.bridge-tag }}
- name: Tag new docker images
run: |
docker tag ${{ needs.build-dockers.outputs.sequencer-tag }} ghcr.io/espressosystems/espresso-sequencer/sequencer:main
Expand All @@ -396,6 +416,7 @@ jobs:
docker tag ${{ needs.build-dockers.outputs.deploy-tag }} ghcr.io/espressosystems/espresso-sequencer/deploy:main
docker tag ${{ needs.build-dockers.outputs.builder-tag }} ghcr.io/espressosystems/espresso-sequencer/builder:main
docker tag ${{ needs.build-dockers.outputs.nasty-client-tag }} ghcr.io/espressosystems/espresso-sequencer/nasty-client:main
docker tag ${{ needs.build-dockers.outputs.bridge-tag }} ghcr.io/espressosystems/espresso-sequencer/bridge:main
- name: Test docker demo
run: |
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/build_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/deploy
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/keygen
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/pub-key
${{ env.CARGO_TARGET_DIR }}/${{ env.TARGET_TRIPLET }}/release/bridge
static-dockers:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -192,6 +193,13 @@ jobs:
images: ghcr.io/espressosystems/espresso-sequencer/deploy
flavor: suffix=musl

- name: Generate bridge metadata
uses: docker/metadata-action@v5
id: bridge
with:
images: ghcr.io/espressosystems/espresso-sequencer/bridge
flavor: suffix=musl

- name: Build and push sequencer docker
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -291,3 +299,13 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.deploy.outputs.tags }}
labels: ${{ steps.deploy.outputs.labels }}

- name: Build and push bridge docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/bridge.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.bridge.outputs.tags }}
labels: ${{ steps.bridge.outputs.labels }}
3 changes: 2 additions & 1 deletion scripts/build-docker-images
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ for ARCH in "amd64" "arm64"; do
;;
esac
mkdir -p ${WORKDIR}/target/$ARCH/release
for binary in "orchestrator" "cdn-broker" "cdn-marshal" "cdn-whitelist" "sequencer" "commitment-task" "submit-transactions" "reset-storage" "state-relay-server" "state-prover" "deploy" "keygen" "permissionless-builder" "nasty-client" "pub-key"; do
for binary in "orchestrator" "cdn-broker" "cdn-marshal" "cdn-whitelist" "sequencer" "commitment-task" "submit-transactions" "reset-storage" "state-relay-server" "state-prover" "deploy" "keygen" "permissionless-builder" "nasty-client" "pub-key" "bridge"; do
cp -v "${CARGO_TARGET_DIR}/${TARGET}/release/$binary" ${WORKDIR}/target/$ARCH/release
done
done
Expand All @@ -50,3 +50,4 @@ docker build -t ghcr.io/espressosystems/espresso-sequencer/submit-transactions:m
docker build -t ghcr.io/espressosystems/espresso-sequencer/deploy:main -f docker/deploy.Dockerfile ${WORKDIR}
docker build -t ghcr.io/espressosystems/espresso-sequencer/builder:main -f docker/permissionless-builder.Dockerfile ${WORKDIR}
docker build -t ghcr.io/espressosystems/espresso-sequencer/nasty-client:main -f docker/nasty-client.Dockerfile ${WORKDIR}
docker build -t ghcr.io/espressosystems/espresso-sequencer/bridge:main -f docker/bridge.Dockerfile ${WORKDIR}
3 changes: 2 additions & 1 deletion scripts/build-docker-images-native
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ cleanup(){
}

mkdir -p "${WORKDIR}/target/$ARCH/release"
for binary in "orchestrator" "cdn-broker" "cdn-marshal" "cdn-whitelist" "sequencer" "commitment-task" "submit-transactions" "reset-storage" "state-relay-server" "state-prover" "deploy" "keygen" "permissionless-builder" "nasty-client" "pub-key"; do
for binary in "orchestrator" "cdn-broker" "cdn-marshal" "cdn-whitelist" "sequencer" "commitment-task" "submit-transactions" "reset-storage" "state-relay-server" "state-prover" "deploy" "keygen" "permissionless-builder" "nasty-client" "pub-key" "bridge"; do
cp -v "${CARGO_TARGET_DIR}/release/$binary" "${WORKDIR}/target/$ARCH/release"
# Patch the interpreter for running without nix inside the ubuntu based docker image.
if [ $KERNEL == "linux" ]; then
Expand All @@ -104,3 +104,4 @@ docker build --platform $PLATFORM -t ghcr.io/espressosystems/espresso-sequencer/
docker build --platform $PLATFORM -t ghcr.io/espressosystems/espresso-sequencer/deploy:main -f docker/deploy.Dockerfile ${WORKDIR}
docker build --platform $PLATFORM -t ghcr.io/espressosystems/espresso-sequencer/builder:main -f docker/permissionless-builder.Dockerfile ${WORKDIR}
docker build --platform $PLATFORM -t ghcr.io/espressosystems/espresso-sequencer/nasty-client:main -f docker/nasty-client.Dockerfile ${WORKDIR}
docker build --platform $PLATFORM -t ghcr.io/espressosystems/espresso-sequencer/bridge:main -f docker/bridge.Dockerfile ${WORKDIR}

0 comments on commit 70aff97

Please sign in to comment.