From 669018819ac18d1bcd2e8abf6d6be4c419198344 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Sat, 25 Feb 2023 00:18:17 -0700 Subject: [PATCH] ci: Add tag versions to Docker binaries --- .circleci/config.yml | 6 ++++++ op-batcher/Dockerfile | 4 +++- op-node/Dockerfile | 4 +++- op-proposer/Dockerfile | 4 +++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d2b3ea0cd9e0..2400ae8cd53f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -228,6 +228,7 @@ jobs: docker build \ $(echo -ne $DOCKER_TAGS | tr '\n' ' ') \ -f <> \ + --build-arg VERSION=$CIRCLE_TAG \ <> - run: name: Configure Docker @@ -1152,6 +1153,11 @@ workflows: - hold: type: approval context: oplabs-gcr-release + filters: + tags: + only: /^op-node\/v.*/ + branches: + ignore: /.*/ - docker-release: name: op-node-docker-release filters: diff --git a/op-batcher/Dockerfile b/op-batcher/Dockerfile index 4a5c895750ce..b31303e7fcdc 100644 --- a/op-batcher/Dockerfile +++ b/op-batcher/Dockerfile @@ -1,5 +1,7 @@ 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 # build op-batcher with the shared go.mod & go.sum files @@ -15,7 +17,7 @@ COPY ./.git /app/.git WORKDIR /app/op-batcher -RUN make op-batcher +RUN make op-batcher VERSION="$VERSION" FROM alpine:3.15 diff --git a/op-node/Dockerfile b/op-node/Dockerfile index 453d914f8299..0b36c5ac9c3b 100644 --- a/op-node/Dockerfile +++ b/op-node/Dockerfile @@ -1,5 +1,7 @@ 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 # build op-node with the shared go.mod & go.sum files @@ -13,7 +15,7 @@ COPY ./.git /app/.git WORKDIR /app/op-node -RUN make op-node +RUN make op-node VERSION="$VERSION" FROM alpine:3.15 diff --git a/op-proposer/Dockerfile b/op-proposer/Dockerfile index 27c53ff1f596..7b7ac3121e1f 100644 --- a/op-proposer/Dockerfile +++ b/op-proposer/Dockerfile @@ -1,5 +1,7 @@ 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 # build op-proposer with the shared go.mod & go.sum files @@ -14,7 +16,7 @@ COPY ./.git /app/.git WORKDIR /app/op-proposer -RUN make op-proposer +RUN make op-proposer VERSION="$VERSION" FROM alpine:3.15