Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
715d17db
Commit
715d17db
authored
Mar 01, 2023
by
Joshua Gutow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multi architecture docker images
parent
0937f338
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
29 deletions
+51
-29
config.yml
.circleci/config.yml
+30
-20
Dockerfile
op-batcher/Dockerfile
+6
-2
Makefile
op-batcher/Makefile
+1
-1
Dockerfile
op-node/Dockerfile
+6
-2
Makefile
op-node/Makefile
+1
-1
Dockerfile
op-proposer/Dockerfile
+6
-2
Makefile
op-proposer/Makefile
+1
-1
No files found.
.circleci/config.yml
View file @
715d17db
...
@@ -147,6 +147,8 @@ jobs:
...
@@ -147,6 +147,8 @@ jobs:
-
"
."
-
"
."
docker-publish
:
docker-publish
:
environment
:
DOCKER_BUILDKIT
:
1
parameters
:
parameters
:
docker_name
:
docker_name
:
description
:
Docker image name
description
:
Docker image name
...
@@ -154,6 +156,13 @@ jobs:
...
@@ -154,6 +156,13 @@ jobs:
docker_tags
:
docker_tags
:
description
:
Docker image tags as csv
description
:
Docker image tags as csv
type
:
string
type
:
string
docker_file
:
description
:
Path to Dockerfile
type
:
string
docker_context
:
description
:
Docker build context
type
:
string
default
:
"
."
registry
:
registry
:
description
:
Docker registry
description
:
Docker registry
type
:
string
type
:
string
...
@@ -162,17 +171,14 @@ jobs:
...
@@ -162,17 +171,14 @@ jobs:
description
:
Docker repo
description
:
Docker repo
type
:
string
type
:
string
default
:
"
oplabs-tools-artifacts/images"
default
:
"
oplabs-tools-artifacts/images"
platforms
:
description
:
Platforms to build for
type
:
string
default
:
"
linux/amd64"
machine
:
machine
:
image
:
ubuntu-2204:2022.07.1
image
:
ubuntu-2204:2022.07.1
resource_class
:
xlarge
resource_class
:
xlarge
steps
:
steps
:
-
attach_workspace
:
at
:
/tmp/docker_images
-
run
:
name
:
Docker load
command
:
|
DOCKER_LABELS=$(echo -ne <<parameters.docker_tags>> | sed "s/,/\n/g" | sed "s/[^a-zA-Z0-9\n]/-/g")
echo -ne $DOCKER_LABELS | tr ' ' '\n' | xargs -I {} docker load -i /tmp/docker_images/<<parameters.docker_name>>_{}.tar
-
gcp-oidc-authenticate
-
gcp-oidc-authenticate
# Below is CircleCI recommended way of specifying nameservers on an Ubuntu box:
# Below is CircleCI recommended way of specifying nameservers on an Ubuntu box:
# https://support.circleci.com/hc/en-us/articles/7323511028251-How-to-set-custom-DNS-on-Ubuntu-based-images-using-netplan
# https://support.circleci.com/hc/en-us/articles/7323511028251-How-to-set-custom-DNS-on-Ubuntu-based-images-using-netplan
...
@@ -181,13 +187,19 @@ jobs:
...
@@ -181,13 +187,19 @@ jobs:
-
run
:
sudo sed -i "s/addresses:/ addresses":" [8.8.8.8, 8.8.4.4] /g" /etc/netplan/50-cloud-init.yaml
-
run
:
sudo sed -i "s/addresses:/ addresses":" [8.8.8.8, 8.8.4.4] /g" /etc/netplan/50-cloud-init.yaml
-
run
:
cat /etc/netplan/50-cloud-init.yaml
-
run
:
cat /etc/netplan/50-cloud-init.yaml
-
run
:
sudo netplan apply
-
run
:
sudo netplan apply
-
checkout
-
run
:
-
run
:
name
:
Publish
name
:
Build &
Publish
command
:
|
command
:
|
gcloud auth configure-docker <<parameters.registry>>
gcloud auth configure-docker <<parameters.registry>>
IMAGE_BASE="<<parameters.registry>>/<<parameters.repo>>/<<parameters.docker_name>>"
IMAGE_BASE="<<parameters.registry>>/<<parameters.repo>>/<<parameters.docker_name>>"
DOCKER_TAGS=$(echo -ne <<parameters.docker_tags>> | sed "s/,/\n/g" | sed "s/[^a-zA-Z0-9\n]/-/g" | sed -e "s|^|${IMAGE_BASE}:|")
DOCKER_TAGS=$(echo -ne <<parameters.docker_tags>> | sed "s/,/\n/g" | sed "s/[^a-zA-Z0-9\n]/-/g" | sed -e "s|^|-t ${IMAGE_BASE}:|")
echo -ne $DOCKER_TAGS | tr ' ' '\n' | xargs -L1 docker push
docker context create buildx-build
docker buildx create --use buildx-build
docker buildx build --platform=<<parameters.platforms>> --push \
$(echo -ne $DOCKER_TAGS | tr '\n' ' ') \
-f <<parameters.docker_file>> \
<<parameters.docker_context>>
docker-release
:
docker-release
:
environment
:
environment
:
...
@@ -1063,11 +1075,11 @@ workflows:
...
@@ -1063,11 +1075,11 @@ workflows:
-
docker-publish
:
-
docker-publish
:
name
:
op-node-docker-publish
name
:
op-node-docker-publish
docker_name
:
op-node
docker_name
:
op-node
docker_file
:
op-node/Dockerfile
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
requires
:
platforms
:
"
linux/amd64,linux/arm64"
-
op-node-docker-build
-
docker-build
:
-
docker-build
:
name
:
op-batcher-docker-build
name
:
op-batcher-docker-build
docker_file
:
op-batcher/Dockerfile
docker_file
:
op-batcher/Dockerfile
...
@@ -1076,12 +1088,12 @@ workflows:
...
@@ -1076,12 +1088,12 @@ workflows:
docker_context
:
.
docker_context
:
.
-
docker-publish
:
-
docker-publish
:
name
:
op-batcher-docker-publish
name
:
op-batcher-docker-publish
docker_file
:
op-batcher/Dockerfile
docker_name
:
op-batcher
docker_name
:
op-batcher
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
requires
:
platforms
:
"
linux/amd64,linux/arm64"
-
op-batcher-docker-build
-
docker-build
:
-
docker-build
:
name
:
op-proposer-docker-build
name
:
op-proposer-docker-build
docker_file
:
op-proposer/Dockerfile
docker_file
:
op-proposer/Dockerfile
...
@@ -1090,12 +1102,12 @@ workflows:
...
@@ -1090,12 +1102,12 @@ workflows:
docker_context
:
.
docker_context
:
.
-
docker-publish
:
-
docker-publish
:
name
:
op-proposer-docker-publish
name
:
op-proposer-docker-publish
docker_file
:
op-proposer/Dockerfile
docker_name
:
op-proposer
docker_name
:
op-proposer
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
requires
:
platforms
:
"
linux/amd64,linux/arm64"
-
op-proposer-docker-build
-
docker-build
:
-
docker-build
:
name
:
op-heartbeat-docker-build
name
:
op-heartbeat-docker-build
docker_file
:
op-heartbeat/Dockerfile
docker_file
:
op-heartbeat/Dockerfile
...
@@ -1104,12 +1116,11 @@ workflows:
...
@@ -1104,12 +1116,11 @@ workflows:
docker_context
:
.
docker_context
:
.
-
docker-publish
:
-
docker-publish
:
name
:
op-heartbeat-docker-publish
name
:
op-heartbeat-docker-publish
docker_file
:
op-heartbeat/Dockerfile
docker_name
:
op-heartbeat
docker_name
:
op-heartbeat
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
requires
:
-
op-heartbeat-docker-build
-
docker-build
:
-
docker-build
:
name
:
indexer-docker-build
name
:
indexer-docker-build
docker_file
:
indexer/Dockerfile
docker_file
:
indexer/Dockerfile
...
@@ -1118,12 +1129,11 @@ workflows:
...
@@ -1118,12 +1129,11 @@ workflows:
docker_context
:
.
docker_context
:
.
-
docker-publish
:
-
docker-publish
:
name
:
indexer-docker-publish
name
:
indexer-docker-publish
docker_file
:
indexer/Dockerfile
docker_name
:
indexer
docker_name
:
indexer
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
requires
:
-
indexer-docker-build
-
hive-test
:
-
hive-test
:
name
:
hive-test-rpc
name
:
hive-test-rpc
version
:
<<pipeline.git.revision>>
version
:
<<pipeline.git.revision>>
...
...
op-batcher/Dockerfile
View file @
715d17db
FROM
golang:1.18.0-alpine3.15 as builder
FROM
--platform=$BUILDPLATFORM
golang:1.18.0-alpine3.15 as builder
ARG
VERSION=v0.0.0
ARG
VERSION=v0.0.0
...
@@ -17,7 +17,11 @@ COPY ./.git /app/.git
...
@@ -17,7 +17,11 @@ COPY ./.git /app/.git
WORKDIR
/app/op-batcher
WORKDIR
/app/op-batcher
RUN
make op-batcher
VERSION
=
"
$VERSION
"
RUN
go mod download
ARG
TARGETOS TARGETARCH
RUN
make op-batcher
VERSION
=
"
$VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
FROM
alpine:3.15
FROM
alpine:3.15
...
...
op-batcher/Makefile
View file @
715d17db
...
@@ -8,7 +8,7 @@ LDFLAGSSTRING +=-X main.Version=$(VERSION)
...
@@ -8,7 +8,7 @@ LDFLAGSSTRING +=-X main.Version=$(VERSION)
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
op-batcher
:
op-batcher
:
env
GO111MODULE
=
on go build
-v
$(LDFLAGS)
-o
./bin/op-batcher ./cmd
env
GO111MODULE
=
on
GOOS
=
$(TARGETOS)
GOARCH
=
$(TARGETARCH)
go build
-v
$(LDFLAGS)
-o
./bin/op-batcher ./cmd
clean
:
clean
:
rm
bin/op-batcher
rm
bin/op-batcher
...
...
op-node/Dockerfile
View file @
715d17db
FROM
golang:1.18.0-alpine3.15 as builder
FROM
--platform=$BUILDPLATFORM
golang:1.18.0-alpine3.15 as builder
ARG
VERSION=v0.0.0
ARG
VERSION=v0.0.0
...
@@ -15,7 +15,11 @@ COPY ./.git /app/.git
...
@@ -15,7 +15,11 @@ COPY ./.git /app/.git
WORKDIR
/app/op-node
WORKDIR
/app/op-node
RUN
make op-node
VERSION
=
"
$VERSION
"
RUN
go mod download
ARG
TARGETOS TARGETARCH
RUN
make op-node
VERSION
=
"
$VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
FROM
alpine:3.15
FROM
alpine:3.15
...
...
op-node/Makefile
View file @
715d17db
...
@@ -9,7 +9,7 @@ LDFLAGSSTRING +=-X github.com/ethereum-optimism/optimism/op-node/version.Meta=$(
...
@@ -9,7 +9,7 @@ LDFLAGSSTRING +=-X github.com/ethereum-optimism/optimism/op-node/version.Meta=$(
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
op-node
:
op-node
:
env
GO111MODULE
=
on go build
-v
$(LDFLAGS)
-o
./bin/op-node ./cmd/main.go
env
GO111MODULE
=
on
GOOS
=
$(TARGETOS)
GOARCH
=
$(TARGETARCH)
go build
-v
$(LDFLAGS)
-o
./bin/op-node ./cmd/main.go
clean
:
clean
:
rm
bin/op-node
rm
bin/op-node
...
...
op-proposer/Dockerfile
View file @
715d17db
FROM
golang:1.18.0-alpine3.15 as builder
FROM
--platform=$BUILDPLATFORM
golang:1.18.0-alpine3.15 as builder
ARG
VERSION=v0.0.0
ARG
VERSION=v0.0.0
...
@@ -16,7 +16,11 @@ COPY ./.git /app/.git
...
@@ -16,7 +16,11 @@ COPY ./.git /app/.git
WORKDIR
/app/op-proposer
WORKDIR
/app/op-proposer
RUN
make op-proposer
VERSION
=
"
$VERSION
"
RUN
go mod download
ARG
TARGETOS TARGETARCH
RUN
make op-proposer
VERSION
=
"
$VERSION
"
GOOS
=
$TARGETOS
GOARCH
=
$TARGETARCH
FROM
alpine:3.15
FROM
alpine:3.15
...
...
op-proposer/Makefile
View file @
715d17db
...
@@ -8,7 +8,7 @@ LDFLAGSSTRING +=-X main.Version=$(VERSION)
...
@@ -8,7 +8,7 @@ LDFLAGSSTRING +=-X main.Version=$(VERSION)
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
LDFLAGS
:=
-ldflags
"
$(LDFLAGSSTRING)
"
op-proposer
:
op-proposer
:
env
GO111MODULE
=
on go build
-v
$(LDFLAGS)
-o
./bin/op-proposer ./cmd
env
GO111MODULE
=
on
GOOS
=
$(TARGETOS)
GOARCH
=
$(TARGETARCH)
go build
-v
$(LDFLAGS)
-o
./bin/op-proposer ./cmd
clean
:
clean
:
rm
bin/op-proposer
rm
bin/op-proposer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment