Skip to content

Commit

Permalink
Multi-arch docker build (bnb-chain#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
trianglesphere authored Mar 2, 2023
1 parent c407b2a commit 8c8557b
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ jobs:
steps:
- when:
condition:
or:
- equal: [ optimism, <<pipeline.git.branch>> ]
- equal: [ optimism-history, <<pipeline.git.branch>> ]
equal: [ optimism, <<pipeline.git.branch>> ]
steps:
- checkout
- setup_remote_docker:
Expand All @@ -43,17 +41,14 @@ jobs:
name: Build and push
command: |
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker build -t "ethereumoptimism/op-geth:$CIRCLE_SHA1" -f Dockerfile .
docker tag "ethereumoptimism/op-geth:$CIRCLE_SHA1" "ethereumoptimism/op-geth:$CIRCLE_BRANCH"
docker push "ethereumoptimism/op-geth:$CIRCLE_SHA1"
docker push "ethereumoptimism/op-geth:$CIRCLE_BRANCH"
if [ $CIRCLE_BRANCH = "optimism" ]
then
docker tag "ethereumoptimism/op-geth:$CIRCLE_SHA1" "ethereumoptimism/op-geth:latest"
docker push "ethereumoptimism/op-geth:latest"
pwd
fi
docker context create buildx-build
docker buildx create --use buildx-build
docker buildx build --push \
--tag "ethereumoptimism/op-geth:$CIRCLE_SHA1" \
--tag "ethereumoptimism/op-geth:$CIRCLE_BRANCH" \
--tag "ethereumoptimism/op-geth:latest \
--platform=linux/arm64,linux/amd64 \
-f Dockerfile .
# Below step is required to prevent CircleCI from barfing on a
# job with no steps
- run: echo 0
Expand Down

0 comments on commit 8c8557b

Please sign in to comment.