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
8d0dadef
Unverified
Commit
8d0dadef
authored
Feb 25, 2023
by
Matthew Slipper
Committed by
GitHub
Feb 25, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4981 from ethereum-optimism/feat/release-approvals
ci: Combine release jobs, add release approval
parents
8969e46b
66901881
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
75 deletions
+78
-75
config.yml
.circleci/config.yml
+63
-72
Dockerfile
op-batcher/Dockerfile
+3
-1
Dockerfile
op-node/Dockerfile
+3
-1
Dockerfile
op-proposer/Dockerfile
+3
-1
ci-docker-tag-op-stack-release.sh
ops/scripts/ci-docker-tag-op-stack-release.sh
+6
-0
No files found.
.circleci/config.yml
View file @
8d0dadef
...
@@ -189,8 +189,22 @@ jobs:
...
@@ -189,8 +189,22 @@ jobs:
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|^|${IMAGE_BASE}:|")
echo -ne $DOCKER_TAGS | tr ' ' '\n' | xargs -L1 docker push
echo -ne $DOCKER_TAGS | tr ' ' '\n' | xargs -L1 docker push
docker-tag-op-stack-release
:
docker-release
:
environment
:
DOCKER_BUILDKIT
:
1
parameters
:
parameters
:
docker_name
:
description
:
Docker image name
type
:
string
docker_tags
:
description
:
Docker image tags as csv
type
:
string
docker_file
:
description
:
Path to Dockerfile
type
:
string
docker_context
:
description
:
Docker build context
type
:
string
registry
:
registry
:
description
:
Docker registry
description
:
Docker registry
type
:
string
type
:
string
...
@@ -199,17 +213,36 @@ jobs:
...
@@ -199,17 +213,36 @@ jobs:
description
:
Docker repo
description
:
Docker repo
type
:
string
type
:
string
default
:
"
oplabs-tools-artifacts/images"
default
:
"
oplabs-tools-artifacts/images"
docker
:
machine
:
-
image
:
cimg/python:3.7
image
:
ubuntu-2204:2022.07.1
resource_class
:
small
resource_class
:
xlarge
steps
:
steps
:
-
gcp-cli/install
-
gcp-cli/install
-
gcp-oidc-authenticate
-
gcp-oidc-authenticate
-
checkout
-
checkout
-
run
:
-
run
:
name
:
Tag
name
:
Build
command
:
|
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|^|-t ${IMAGE_BASE}:|")
docker build \
$(echo -ne $DOCKER_TAGS | tr '\n' ' ') \
-f <<parameters.docker_file>> \
--build-arg VERSION=$CIRCLE_TAG \
<<parameters.docker_context>>
-
run
:
name
:
Configure Docker
command
:
|
command
:
|
gcloud auth configure-docker <<parameters.registry>>
gcloud auth configure-docker <<parameters.registry>>
-
run
:
name
:
Publish
command
:
|
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}:|")
echo -ne $DOCKER_TAGS | tr ' ' '\n' | xargs -L1 docker push
-
run
:
name
:
Tag
command
:
|
./ops/scripts/ci-docker-tag-op-stack-release.sh <<parameters.registry>>/<<parameters.repo>> $CIRCLE_TAG $CIRCLE_SHA1
./ops/scripts/ci-docker-tag-op-stack-release.sh <<parameters.registry>>/<<parameters.repo>> $CIRCLE_TAG $CIRCLE_SHA1
contracts-bedrock-tests
:
contracts-bedrock-tests
:
...
@@ -1117,113 +1150,71 @@ workflows:
...
@@ -1117,113 +1150,71 @@ workflows:
-
op-proposer-docker-build
-
op-proposer-docker-build
release
:
release
:
jobs
:
jobs
:
-
docker-build
:
-
hold
:
name
:
op-node-docker-build
type
:
approval
context
:
oplabs-gcr-release
filters
:
filters
:
tags
:
tags
:
only
:
/^op-
[a-z0-9\-]*
\/v.*/
only
:
/^op-
node
\/v.*/
branches
:
branches
:
ignore
:
/.*/
ignore
:
/.*/
docker_file
:
op-node/Dockerfile
-
docker-release
:
docker_name
:
op-node
name
:
op-node-docker-release
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context
:
.
-
docker-publish
:
name
:
op-node-docker-publish
filters
:
filters
:
tags
:
tags
:
only
:
/^op-
[a-z0-9\-]*
\/v.*/
only
:
/^op-
node
\/v.*/
branches
:
branches
:
ignore
:
/.*/
ignore
:
/.*/
docker_file
:
op-node/Dockerfile
docker_name
:
op-node
docker_name
:
op-node
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context
:
.
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
-release
requires
:
requires
:
-
op-node-docker-bui
ld
-
ho
ld
-
docker-
build
:
-
docker-
release
:
name
:
op-batcher-docker-
build
name
:
op-batcher-docker-
release
filters
:
filters
:
tags
:
tags
:
only
:
/^op-
[a-z0-9\-]*
\/v.*/
only
:
/^op-
batcher
\/v.*/
branches
:
branches
:
ignore
:
/.*/
ignore
:
/.*/
docker_file
:
op-batcher/Dockerfile
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>>
docker_context
:
.
docker_context
:
.
-
docker-publish
:
name
:
op-batcher-docker-publish
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
docker_name
:
op-batcher
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
-release
requires
:
requires
:
-
op-batcher-docker-bui
ld
-
ho
ld
-
docker-
build
:
-
docker-
release
:
name
:
op-proposer-docker-
build
name
:
op-proposer-docker-
release
filters
:
filters
:
tags
:
tags
:
only
:
/^op-
[a-z0-9\-]*
\/v.*/
only
:
/^op-
proposer
\/v.*/
branches
:
branches
:
ignore
:
/.*/
ignore
:
/.*/
docker_file
:
op-proposer/Dockerfile
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>>
docker_context
:
.
docker_context
:
.
-
docker-publish
:
name
:
op-proposer-docker-publish
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
docker_name
:
op-proposer
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
context
:
-
oplabs-gcr
-
oplabs-gcr
-release
requires
:
requires
:
-
op-proposer-docker-bui
ld
-
ho
ld
-
docker-build
:
-
docker-build
:
name
:
op-migrate-docker-
build
name
:
op-migrate-docker-
release
filters
:
filters
:
tags
:
tags
:
only
:
/^op-
[a-z0-9\-]*
\/v.*/
only
:
/^op-
migrate
\/v.*/
branches
:
branches
:
ignore
:
/.*/
ignore
:
/.*/
docker_file
:
op-chain-ops/Dockerfile
docker_file
:
op-chain-ops/Dockerfile
docker_name
:
op-migrate
docker_name
:
op-migrate
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
docker_context
:
.
docker_context
:
.
-
docker-publish
:
name
:
op-migrate-docker-publish
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
docker_name
:
op-migrate
docker_tags
:
<<pipeline.git.revision>>,<<pipeline.git.branch>>
context
:
-
oplabs-gcr
requires
:
-
op-migrate-docker-build
-
docker-tag-op-stack-release
:
name
:
docker-tag-op-stack-release
filters
:
tags
:
only
:
/^op-[a-z0-9\-]*\/v.*/
branches
:
ignore
:
/.*/
requires
:
-
op-node-docker-publish
-
op-proposer-docker-publish
-
op-batcher-docker-publish
-
op-migrate-docker-publish
context
:
context
:
-
oplabs-gcr-release
-
oplabs-gcr-release
requires
:
-
hold
\ No newline at end of file
op-batcher/Dockerfile
View file @
8d0dadef
FROM
golang:1.18.0-alpine3.15 as builder
FROM
golang:1.18.0-alpine3.15 as builder
ARG
VERSION=v0.0.0
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
# build op-batcher with the shared go.mod & go.sum files
# build op-batcher with the shared go.mod & go.sum files
...
@@ -15,7 +17,7 @@ COPY ./.git /app/.git
...
@@ -15,7 +17,7 @@ COPY ./.git /app/.git
WORKDIR
/app/op-batcher
WORKDIR
/app/op-batcher
RUN
make op-batcher
RUN
make op-batcher
VERSION
=
"
$VERSION
"
FROM
alpine:3.15
FROM
alpine:3.15
...
...
op-node/Dockerfile
View file @
8d0dadef
FROM
golang:1.18.0-alpine3.15 as builder
FROM
golang:1.18.0-alpine3.15 as builder
ARG
VERSION=v0.0.0
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
# build op-node with the shared go.mod & go.sum files
# build op-node with the shared go.mod & go.sum files
...
@@ -13,7 +15,7 @@ COPY ./.git /app/.git
...
@@ -13,7 +15,7 @@ COPY ./.git /app/.git
WORKDIR
/app/op-node
WORKDIR
/app/op-node
RUN
make op-node
RUN
make op-node
VERSION
=
"
$VERSION
"
FROM
alpine:3.15
FROM
alpine:3.15
...
...
op-proposer/Dockerfile
View file @
8d0dadef
FROM
golang:1.18.0-alpine3.15 as builder
FROM
golang:1.18.0-alpine3.15 as builder
ARG
VERSION=v0.0.0
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
RUN
apk add
--no-cache
make gcc musl-dev linux-headers git jq bash
# build op-proposer with the shared go.mod & go.sum files
# build op-proposer with the shared go.mod & go.sum files
...
@@ -14,7 +16,7 @@ COPY ./.git /app/.git
...
@@ -14,7 +16,7 @@ COPY ./.git /app/.git
WORKDIR
/app/op-proposer
WORKDIR
/app/op-proposer
RUN
make op-proposer
RUN
make op-proposer
VERSION
=
"
$VERSION
"
FROM
alpine:3.15
FROM
alpine:3.15
...
...
ops/scripts/ci-docker-tag-op-stack-release.sh
View file @
8d0dadef
...
@@ -35,5 +35,11 @@ fi
...
@@ -35,5 +35,11 @@ fi
echo
"Tagging
$SOURCE_IMAGE_TAG
with '
$IMAGE_TAG
'"
echo
"Tagging
$SOURCE_IMAGE_TAG
with '
$IMAGE_TAG
'"
gcloud container images add-tag
-q
"
$SOURCE_IMAGE_TAG
"
"
$TARGET_IMAGE_TAG
"
gcloud container images add-tag
-q
"
$SOURCE_IMAGE_TAG
"
"
$TARGET_IMAGE_TAG
"
# Do not tag with latest if the release is a release candidate.
if
[[
"
$IMAGE_TAG
"
==
*
"rc"
*
]]
;
then
echo
"Not tagging with 'latest' because the release is a release candidate."
exit
0
fi
echo
"Tagging
$SOURCE_IMAGE_TAG
with 'latest'"
echo
"Tagging
$SOURCE_IMAGE_TAG
with 'latest'"
gcloud container images add-tag
-q
"
$SOURCE_IMAGE_TAG
"
"
$TARGET_IMAGE_TAG_LATEST
"
gcloud container images add-tag
-q
"
$SOURCE_IMAGE_TAG
"
"
$TARGET_IMAGE_TAG_LATEST
"
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