Skip to content

Commit 9b4aa11

Browse files
committed
contracts-bedrock: add deployer docker image
Published as `ethereumoptimism/deployer-bedrock`. This will be published along with new releases of the `npm` package. It wraps `hardhat deploy`. The config file will want to be mounted in at runtime if deploying to a non default network.
1 parent ef29d8a commit 9b4aa11

5 files changed

Lines changed: 65 additions & 0 deletions

File tree

.changeset/moody-beds-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@eth-optimism/contracts-bedrock': patch
3+
---
4+
5+
Add deployer docker image

.github/workflows/publish-canary.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
drippie-mon: ${{ steps.packages.outputs.drippie-mon }}
2222
data-transport-layer: ${{ steps.packages.outputs.data-transport-layer }}
2323
contracts: ${{ steps.packages.outputs.contracts }}
24+
contracts-bedrock: ${{ steps.packages.outputs.contracts-bedrock }}
2425
gas-oracle: ${{ steps.packages.outputs.gas-oracle }}
2526
replica-healthcheck: ${{ steps.packages.outputs.replica-healthcheck }}
2627
hardhat-node: ${{ steps.packages.outputs.hardhat-node }}
@@ -311,6 +312,33 @@ jobs:
311312
push: true
312313
tags: ethereumoptimism/deployer:${{ needs.canary-publish.outputs.canary-docker-tag }}
313314

315+
contracts-bedrock:
316+
name: Publish deployer-bedrock Version ${{ needs.canary-publish.outputs.canary-docker-tag }}
317+
needs: canary-publish
318+
if: needs.canary-publish.outputs.contracts-bedrock != ''
319+
runs-on: ubuntu-latest
320+
321+
steps:
322+
- name: Checkout
323+
uses: actions/checkout@v2
324+
- name: Set up Docker Buildx
325+
uses: docker/setup-buildx-action@v1
326+
327+
- name: Login to Docker Hub
328+
uses: docker/login-action@v1
329+
with:
330+
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
331+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
332+
333+
- name: Build and push
334+
uses: docker/build-push-action@v2
335+
with:
336+
context: .
337+
file: ./ops/docker/Dockerfile.packages
338+
target: deployer-bedrock
339+
push: true
340+
tags: ethereumoptimism/deployer-bedrock:${{ needs.canary-publish.outputs.canary-docker-tag }}
341+
314342
integration_tests:
315343
name: Publish Integration tests ${{ needs.canary-publish.outputs.integration-tests }}
316344
needs: canary-publish

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
drippie-mon: ${{ steps.packages.outputs.drippie-mon }}
1818
data-transport-layer: ${{ steps.packages.outputs.data-transport-layer }}
1919
contracts: ${{ steps.packages.outputs.contracts }}
20+
contracts-bedrock: ${{ steps.packages.outputs.contracts-bedrock }}
2021
gas-oracle: ${{ steps.packages.outputs.gas-oracle }}
2122
replica-healthcheck: ${{ steps.packages.outputs.replica-healthcheck }}
2223
proxyd: ${{ steps.packages.outputs.proxyd }}
@@ -454,6 +455,33 @@ jobs:
454455
push: true
455456
tags: ethereumoptimism/deployer:${{ needs.release.outputs.contracts }},ethereumoptimism/deployer:latest
456457

458+
contracts-bedrock:
459+
name: Publish deployer-bedrock Version ${{ needs.release.outputs.contracts-bedrock }}
460+
needs: release
461+
if: needs.release.outputs.contracts != ''
462+
runs-on: ubuntu-latest
463+
464+
steps:
465+
- name: Checkout
466+
uses: actions/checkout@v2
467+
- name: Set up Docker Buildx
468+
uses: docker/setup-buildx-action@v1
469+
470+
- name: Login to Docker Hub
471+
uses: docker/login-action@v1
472+
with:
473+
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }}
474+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }}
475+
476+
- name: Build and push
477+
uses: docker/build-push-action@v2
478+
with:
479+
context: .
480+
file: ./ops/docker/Dockerfile.packages
481+
target: deployer-bedrock
482+
push: true
483+
tags: ethereumoptimism/deployer-bedrock:${{ needs.release.outputs.contracts-bedrock }},ethereumoptimism/deployer-bedrock:latest
484+
457485
integration_tests:
458486
name: Publish Integration tests ${{ needs.release.outputs.integration-tests }}
459487
needs: release

ops/docker/Dockerfile.packages

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ WORKDIR /opt/optimism/packages/contracts
4545
COPY ./ops/scripts/deployer.sh .
4646
CMD ["yarn", "run", "deploy"]
4747

48+
FROM base as deployer-bedrock
49+
WORKDIR /opt/optimism/packages/contracts-bedrock
50+
CMD ["yarn", "run", "deploy"]
4851

4952
FROM base as data-transport-layer
5053
WORKDIR /opt/optimism/packages/data-transport-layer

packages/contracts-bedrock/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"prebuild": "yarn ts-node scripts/verifyFoundryInstall.ts",
1919
"build": "hardhat compile && tsc && hardhat typechain",
2020
"build:ts": "tsc",
21+
"deploy": "hardhat deploy",
2122
"test": "forge test",
2223
"gas-snapshot": "forge snapshot",
2324
"storage-snapshot": "./scripts/storage-snapshot.sh",

0 commit comments

Comments
 (0)