Skip to content

Commit

Permalink
CI: dynamic base image for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mdibaiee committed Jul 28, 2022
1 parent d4a201a commit 85e7872
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ jobs:
context: .
file: ${{ matrix.connector }}/Dockerfile
load: true
build-args: BASE_IMAGE="ghcr.io/estuary/base-image:${{ steps.prep.outputs.tag }}"
tags: ghcr.io/estuary/${{ matrix.connector }}:local
secrets: |
"rockset_api_key=${{ secrets.ROCKSET_API_KEY }}"
Expand Down Expand Up @@ -216,6 +217,7 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
build-args: BASE_IMAGE="ghcr.io/estuary/base-image:${{ steps.prep.outputs.tag }}"
file: ${{ matrix.connector }}/Dockerfile
push: true
tags: ghcr.io/estuary/${{ matrix.connector }}:${{ steps.prep.outputs.tag }}
Expand Down
4 changes: 3 additions & 1 deletion materialize-bigquery/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-bullseye as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-bigquery/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

RUN apt-get update -y \
&& apt-get install --no-install-recommends -y ca-certificates \
Expand Down
4 changes: 3 additions & 1 deletion materialize-elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM --platform=linux/amd64 golang:1.17-bullseye as builder
Expand Down Expand Up @@ -25,7 +27,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-elasticsearch

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion materialize-firebolt/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM --platform=linux/amd64 golang:1.17-bullseye as builder
Expand All @@ -24,7 +26,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-firebolt

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion materialize-google-sheets/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-bullseye as builder
Expand All @@ -24,7 +26,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-google-sheets

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion materialize-postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM --platform=linux/amd64 golang:1.17-bullseye as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-postgres/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion materialize-rockset/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-bullseye as builder
Expand Down Expand Up @@ -29,7 +31,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-rockset/cmd/connector/

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion materialize-s3-parquet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-bullseye as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-s3-parquet

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion materialize-snowflake/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-bullseye as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-snowflake/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

RUN apt-get update -y \
&& apt-get install --no-install-recommends -y \
Expand Down
4 changes: 3 additions & 1 deletion materialize-webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-bullseye as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -tags nozstd -v -o ./connector ./materialize-webhook/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-gcs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -o ./connector -v ./source-gcs/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-hello-world/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -21,7 +23,7 @@ RUN go build -o ./connector -v ./source-hello-world/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-http-file/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -o ./connector -v ./source-http-file/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-kafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM rust:1.54-slim-buster as builder
Expand Down Expand Up @@ -33,7 +35,7 @@ RUN touch src/main.rs \

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-kinesis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -22,7 +24,7 @@ RUN go build -o ./connector -v ./source-kinesis/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-mysql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -23,7 +25,7 @@ RUN go build -o ./connector -v ./source-mysql/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -24,7 +26,7 @@ RUN go build -o ./connector -v ./source-postgres/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-s3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -24,7 +26,7 @@ RUN go build -o ./connector -v ./source-s3/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion source-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG BASE_IMAGE=ghcr.io/estuary/base-image:v1

# Build Stage
################################################################################
FROM golang:1.17-buster as builder
Expand All @@ -21,7 +23,7 @@ RUN go build -o ./connector -v ./source-test/...

# Runtime Stage
################################################################################
FROM ghcr.io/estuary/base-image:v1
FROM ${BASE_IMAGE}

WORKDIR /connector
ENV PATH="/connector:$PATH"
Expand Down

0 comments on commit 85e7872

Please sign in to comment.