Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/flyte-binary-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ jobs:
path: docker/demo-bundled/images/tar
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
registry: ghcr.io
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- name: Build and push Image
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@v6
Expand Down Expand Up @@ -153,11 +153,19 @@ jobs:
type=sha,format=long,
- name: Login to GitHub Container Registry
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
registry: ghcr.io
username: "${{ secrets.FLYTE_BOT_USERNAME }}"
password: "${{ secrets.FLYTE_BOT_PAT }}"
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- name: Save console image tarballs
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
run: |
mkdir -p docker/demo-bundled/images/tar/amd64 docker/demo-bundled/images/tar/arm64
docker pull --platform linux/amd64 ghcr.io/flyteorg/flyte-client-v2:latest
docker save ghcr.io/flyteorg/flyte-client-v2:latest -o docker/demo-bundled/images/tar/amd64/flyte-client-v2.tar
docker pull --platform linux/arm64 ghcr.io/flyteorg/flyte-client-v2:latest
docker save ghcr.io/flyteorg/flyte-client-v2:latest -o docker/demo-bundled/images/tar/arm64/flyte-client-v2.tar
- name: Build and push multi-arch image
uses: docker/build-push-action@v6
with:
Expand Down
114 changes: 114 additions & 0 deletions .github/workflows/flyte-core-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Build & Push Flyte Core v2 Images

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on:
push:
branches:
- v2
paths:
- "docker/Dockerfile.*"
- "docker/docker-bake.hcl"
- "actions/**"
- "cache_service/**"
- "dataproxy/**"
- "events/**"
- "executor/**"
- "runs/**"
- "flytestdlib/**"
- "flyteplugins/**"
- "flyteidl2/**"
- "gen/**"
- "go.mod"
- "go.sum"
pull_request:
branches:
- v2
paths:
- "docker/Dockerfile.*"
- "docker/docker-bake.hcl"
- "actions/**"
- "cache_service/**"
- "dataproxy/**"
- "events/**"
- "executor/**"
- "runs/**"
- "flytestdlib/**"
- "flyteplugins/**"
- "flyteidl2/**"
- "gen/**"
- "go.mod"
- "go.sum"

jobs:
prepare:
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
sparse-checkout: docker/docker-bake.hcl
sparse-checkout-cone-mode: false
- name: Generate matrix
id: generate
uses: docker/bake-action/subaction/matrix@v7
with:
files: docker/docker-bake.hcl
target: default
fields: platforms
build-and-push:
needs: prepare
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Login to GitHub Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}

- name: Set short Git SHA as tag
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Build multi-arch image (PR)
if: github.event_name == 'pull_request'
uses: docker/bake-action@v7
with:
source: .
files: docker/docker-bake.hcl
targets: ${{ matrix.target }}
set: |
*.platform=${{ matrix.platforms }}
*.args.tags="ghcr.io/flyteorg/flyte/${{ matrix.target }}:${{ env.SHORT_SHA }}"


- name: Build and push images
if: github.event_name == 'push'
uses: docker/bake-action@v7
with:
source: .
files: docker/docker-bake.hcl
push: true
targets: ${{ matrix.target }}
set: |
*.platform=${{ matrix.platforms }}
*.args.tags="ghcr.io/flyteorg/flyte/${{ matrix.target }}:${{ env.SHORT_SHA }}"

2 changes: 1 addition & 1 deletion .github/workflows/git_town.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Git Town

on:
pull_request:
pull_request_target:
branches:
- '**'

Expand Down
2 changes: 2 additions & 0 deletions actions/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Actions service configuration
actions: {}
34 changes: 34 additions & 0 deletions docker/Dockerfile.actions
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# syntax=docker/dockerfile:1

# Build stage
ARG GO_VERSION
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

Check warning on line 5 in docker/Dockerfile.actions

View workflow job for this annotation

GitHub Actions / build-and-push (actions, linux/amd64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in docker/Dockerfile.actions

View workflow job for this annotation

GitHub Actions / build-and-push (actions, linux/arm64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

ARG TARGETOS
ARG TARGETARCH

WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

COPY actions/ actions/
COPY flytestdlib/ flytestdlib/
COPY flyteplugins/ flyteplugins/
COPY flyteidl2/ flyteidl2/
COPY gen/ gen/
COPY executor/ executor/

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -trimpath -o actions-service actions/cmd/main.go

# Final stage
FROM gcr.io/distroless/static-debian12

COPY --from=builder /src/actions-service /
# Copy default config
COPY --from=builder /src/actions/config.yaml /

ENTRYPOINT ["/actions-service"]
29 changes: 29 additions & 0 deletions docker/Dockerfile.cache_service
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1

# Build stage
ARG GO_VERSION
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

Check warning on line 5 in docker/Dockerfile.cache_service

View workflow job for this annotation

GitHub Actions / build-and-push (cache_service, linux/amd64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in docker/Dockerfile.cache_service

View workflow job for this annotation

GitHub Actions / build-and-push (cache_service, linux/arm64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

ARG TARGETOS
ARG TARGETARCH

WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

COPY cache_service/ cache_service/
COPY flytestdlib/ flytestdlib/
COPY gen/ gen/

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -trimpath -o cache-service cache_service/cmd/main.go

# Final stage
FROM gcr.io/distroless/static-debian12

COPY --from=builder /src/cache-service /

ENTRYPOINT ["/cache-service"]
29 changes: 29 additions & 0 deletions docker/Dockerfile.dataproxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1

# Build stage
ARG GO_VERSION
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

Check warning on line 5 in docker/Dockerfile.dataproxy

View workflow job for this annotation

GitHub Actions / build-and-push (dataproxy, linux/arm64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in docker/Dockerfile.dataproxy

View workflow job for this annotation

GitHub Actions / build-and-push (dataproxy, linux/amd64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

ARG TARGETOS
ARG TARGETARCH

WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

COPY dataproxy/ dataproxy/
COPY flytestdlib/ flytestdlib/
COPY gen/ gen/

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -trimpath -o dataproxy dataproxy/cmd/main.go

# Final stage
FROM gcr.io/distroless/static-debian12

COPY --from=builder /src/dataproxy /

ENTRYPOINT ["/dataproxy"]
29 changes: 29 additions & 0 deletions docker/Dockerfile.events
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1

# Build stage
ARG GO_VERSION
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

Check warning on line 5 in docker/Dockerfile.events

View workflow job for this annotation

GitHub Actions / build-and-push (events, linux/arm64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in docker/Dockerfile.events

View workflow job for this annotation

GitHub Actions / build-and-push (events, linux/amd64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

ARG TARGETOS
ARG TARGETARCH

WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

COPY events/ events/
COPY flytestdlib/ flytestdlib/
COPY gen/ gen/

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -trimpath -o events events/cmd/main.go

# Final stage
FROM gcr.io/distroless/static-debian12

COPY --from=builder /src/events /

ENTRYPOINT ["/events"]
31 changes: 31 additions & 0 deletions docker/Dockerfile.executor
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# syntax=docker/dockerfile:1

# Build stage
ARG GO_VERSION
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

Check warning on line 5 in docker/Dockerfile.executor

View workflow job for this annotation

GitHub Actions / build-and-push (executor, linux/arm64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in docker/Dockerfile.executor

View workflow job for this annotation

GitHub Actions / build-and-push (executor, linux/amd64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

ARG TARGETOS
ARG TARGETARCH

WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

COPY executor/ executor/
COPY flyteplugins/ flyteplugins/
COPY flytestdlib/ flytestdlib/
COPY flyteidl2/ flyteidl2/
COPY gen/ gen/

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -trimpath -o executor executor/cmd/main.go

# Final stage
FROM gcr.io/distroless/static-debian12

COPY --from=builder /src/executor /

ENTRYPOINT ["/executor"]
30 changes: 30 additions & 0 deletions docker/Dockerfile.runs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# syntax=docker/dockerfile:1

# Build stage
ARG GO_VERSION
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS builder

Check warning on line 5 in docker/Dockerfile.runs

View workflow job for this annotation

GitHub Actions / build-and-push (runs, linux/arm64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in docker/Dockerfile.runs

View workflow job for this annotation

GitHub Actions / build-and-push (runs, linux/amd64)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG golang:${GO_VERSION}-alpine results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

ARG TARGETOS
ARG TARGETARCH

WORKDIR /src
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

COPY runs/ runs/
COPY flytestdlib/ flytestdlib/
COPY gen/ gen/

RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -trimpath -o runs-service runs/cmd/main.go

# Final stage
FROM gcr.io/distroless/static-debian12

COPY --from=builder /src/runs-service /
COPY --from=builder /src/runs/config.yaml /

ENTRYPOINT ["/runs-service"]
Loading
Loading