Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release automation addedd for flyte definition #835

Merged
merged 18 commits into from
Apr 1, 2021
Merged
Show file tree
Hide file tree
Changes from 15 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
42 changes: 42 additions & 0 deletions .github/workflows/release-kustomize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish flyte defination file

on:
workflow_dispatch:

jobs:
release-flyte-defination:
name: Publish flyte defination file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Build kustomize
run: |
make release_automation
make kustomize
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.FLYTE_BOT_PAT }}
commit-message: Updated flyte defination
committer: GitHub <flytebot@flyte.org>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: bot-flyte-defination
delete-branch: true
title: 'Updated flyte defination'
body: |
Updated flyte defination
- Updated GCP Flyte defination
- Updated EKS Flyte defination
- Updated SANDBOX Flyte defination
- Updated TEST Flyte defination
- Auto-generated by [flytebot]
labels: |
kustomize
team-reviewers: |
owners
maintainers
draft: false
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ pip-compile $(1) --upgrade --verbose
endef

.PHONY: kustomize
kustomize:
kustomize:
KUSTOMIZE_VERSION=3.9.2 bash script/generate_kustomize.sh
git stash push -- kustomize/

.PHONY: release_automation
release_automation:
bash script/release.sh

.PHONY: deploy_sandbox
deploy_sandbox:
Expand Down
6 changes: 3 additions & 3 deletions deployment/eks/flyte_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8587,7 +8587,7 @@ spec:
- --config
- /etc/datacatalog/config/*.yaml
- serve
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: datacatalog
ports:
Expand All @@ -8610,7 +8610,7 @@ spec:
- /etc/datacatalog/config/*.yaml
- migrate
- run
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: run-migrations
volumeMounts:
Expand Down Expand Up @@ -8838,7 +8838,7 @@ spec:
- envFrom:
- configMapRef:
name: flyte-console-config
image: ghcr.io/flyteorg/flyteconsole:v0.19.6
image: ghcr.io/flyteorg/flyteconsole:v0.19.7
name: flyteconsole
ports:
- containerPort: 8080
Expand Down
6 changes: 3 additions & 3 deletions deployment/gcp/flyte_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8619,7 +8619,7 @@ spec:
- --config
- /etc/datacatalog/config/*.yaml
- serve
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: datacatalog
ports:
Expand All @@ -8642,7 +8642,7 @@ spec:
- /etc/datacatalog/config/*.yaml
- migrate
- run
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: run-migrations
volumeMounts:
Expand Down Expand Up @@ -8870,7 +8870,7 @@ spec:
- envFrom:
- configMapRef:
name: flyte-console-config
image: ghcr.io/flyteorg/flyteconsole:v0.19.6
image: ghcr.io/flyteorg/flyteconsole:v0.19.7
name: flyteconsole
ports:
- containerPort: 8080
Expand Down
6 changes: 3 additions & 3 deletions deployment/sandbox/flyte_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2722,7 +2722,7 @@ spec:
- --config
- /etc/datacatalog/config/*.yaml
- serve
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: datacatalog
ports:
Expand All @@ -2740,7 +2740,7 @@ spec:
- /etc/datacatalog/config/*.yaml
- migrate
- run
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: run-migrations
volumeMounts:
Expand Down Expand Up @@ -2979,7 +2979,7 @@ spec:
- envFrom:
- configMapRef:
name: flyte-console-config
image: ghcr.io/flyteorg/flyteconsole:v0.19.6
image: ghcr.io/flyteorg/flyteconsole:v0.19.7
name: flyteconsole
ports:
- containerPort: 8080
Expand Down
4 changes: 2 additions & 2 deletions deployment/test/flyte_generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ spec:
- --config
- /etc/datacatalog/config/*.yaml
- serve
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: datacatalog
ports:
Expand All @@ -600,7 +600,7 @@ spec:
- /etc/datacatalog/config/*.yaml
- migrate
- run
image: ghcr.io/flyteorg/datacatalog:v0.3.0
image: ghcr.io/flyteorg/datacatalog:v0.3.1
imagePullPolicy: IfNotPresent
name: run-migrations
volumeMounts:
Expand Down
12 changes: 4 additions & 8 deletions kustomize/overlays/eks/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,17 @@ bases:
images:
# FlyteAdmin
- name: flyteadmin # match images with this name
newTag: v0.4.0 # override the tag
newTag: v0.4.0 # FLYTEADMIN_TAG override the tag
newName: ghcr.io/flyteorg/flyteadmin # override the name
# FlyteConsole
- name: flyteconsole # match images with this name
newTag: v0.19.6 # override the tag
newTag: v0.19.7 # FLYTECONSOLE_TAG the tag
newName: ghcr.io/flyteorg/flyteconsole # override the namep
# Flyte DataCatalog
- name: datacatalog # match images with this name
newTag: v0.3.0 # override the tag
newTag: v0.3.1 # DATACATALOG_TAG override the tag
newName: ghcr.io/flyteorg/datacatalog # override the name
# FlytePropeller
- name: flytepropeller # match images with this name
newTag: v0.7.8 # override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
# Webhook
- name: webhook # match images with this name
newTag: v0.7.8 # override the tag
newTag: v0.7.8 # FLYTEPROPELLER_TAG override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
12 changes: 4 additions & 8 deletions kustomize/overlays/gcp/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@ bases:
images:
# FlyteAdmin
- name: flyteadmin # match images with this name
newTag: v0.4.0 # override the tag
newTag: v0.4.0 # FLYTEADMIN_TAG override the tag
newName: ghcr.io/flyteorg/flyteadmin # override the name
# FlyteConsole
- name: flyteconsole # match images with this name
newTag: v0.19.6 # override the tag
newTag: v0.19.7 # FLYTECONSOLE_TAG the tag
newName: ghcr.io/flyteorg/flyteconsole # override the namep
# Flyte DataCatalog
- name: datacatalog # match images with this name
newTag: v0.3.0 # override the tag
newTag: v0.3.1 # DATACATALOG_TAG override the tag
newName: ghcr.io/flyteorg/datacatalog # override the name
# FlytePropeller
- name: flytepropeller # match images with this name
newTag: v0.7.8 # override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
# Webhook
- name: webhook # match images with this name
newTag: v0.7.8 # override the tag
newTag: v0.7.8 # FLYTEPROPELLER_TAG override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
12 changes: 4 additions & 8 deletions kustomize/overlays/sandbox/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,19 @@ resources:
images:
# FlyteAdmin
- name: flyteadmin # match images with this name
newTag: v0.4.0 # override the tag
newTag: v0.4.0 # FLYTEADMIN_TAG override the tag
newName: ghcr.io/flyteorg/flyteadmin # override the name
# FlyteConsole
- name: flyteconsole # match images with this name
newTag: v0.19.6 # override the tag
newTag: v0.19.7 # FLYTECONSOLE_TAG the tag
newName: ghcr.io/flyteorg/flyteconsole # override the namep
# Flyte DataCatalog
- name: datacatalog # match images with this name
newTag: v0.3.0 # override the tag
newTag: v0.3.1 # DATACATALOG_TAG override the tag
newName: ghcr.io/flyteorg/datacatalog # override the name
# FlytePropeller
- name: flytepropeller # match images with this name
newTag: v0.7.8 # override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
# Webhook
- name: webhook # match images with this name
newTag: v0.7.8 # override the tag
newTag: v0.7.8 # FLYTEPROPELLER_TAG override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
# Override postgres image to use alpine based (rather smaller) docker image
- name: postgres
Expand Down
12 changes: 4 additions & 8 deletions kustomize/overlays/test/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,19 @@ bases:
images:
# FlyteAdmin
- name: flyteadmin # match images with this name
newTag: v0.4.0 # override the tag
newTag: v0.4.0 # FLYTEADMIN_TAG override the tag
newName: ghcr.io/flyteorg/flyteadmin # override the name
# FlyteConsole
- name: flyteconsole # match images with this name
newTag: v0.19.6 # override the tag
newTag: v0.19.7 # FLYTECONSOLE_TAG the tag
newName: ghcr.io/flyteorg/flyteconsole # override the namep
# Flyte DataCatalog
- name: datacatalog # match images with this name
newTag: v0.3.0 # override the tag
newTag: v0.3.1 # DATACATALOG_TAG override the tag
newName: ghcr.io/flyteorg/datacatalog # override the name
# FlytePropeller
- name: flytepropeller # match images with this name
newTag: v0.7.8 # override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
# Webhook
- name: webhook # match images with this name
newTag: v0.7.8 # override the tag
newTag: v0.7.8 # FLYTEPROPELLER_TAG override the tag
newName: ghcr.io/flyteorg/flytepropeller # override the name
# Override postgres image to use alpine based (rather smaller) docker image
- name: postgres
Expand Down
13 changes: 13 additions & 0 deletions script/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -ex

FLYTEADMIN_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/flyteadmin/releases/latest" | jq -r .tag_name)
DATACATALOG_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/datacatalog/releases/latest" | jq -r .tag_name)
FLYTECONSOLE_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/flyteconsole/releases/latest" | jq -r .tag_name)
FLYTEPROPELLER_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/flytepropeller/releases/latest" | jq -r .tag_name)

grep -rlZ "newTag:[^P]*# FLYTEADMIN_TAG" ./kustomize/overlays | xargs -0 sed -i "s/newTag:[^P]*# FLYTEADMIN_TAG/newTag: ${FLYTEADMIN_TAG} # FLYTEADMIN_TAG/g"
grep -rlZ "newTag:[^P]*# DATACATALOG_TAG" ./kustomize/overlays | xargs -0 sed -i "s/newTag:[^P]*# DATACATALOG_TAG/newTag: ${DATACATALOG_TAG} # DATACATALOG_TAG/g"
grep -rlZ "newTag:[^P]*# FLYTECONSOLE_TAG" ./kustomize/overlays | xargs -0 sed -i "s/newTag:[^P]*# FLYTECONSOLE_TAG/newTag: ${FLYTECONSOLE_TAG} # FLYTECONSOLE_TAG/g"
grep -rlZ "newTag:[^P]*# FLYTEPROPELLER_TAG" ./kustomize/overlays | xargs -0 sed -i "s/newTag:[^P]*# FLYTEPROPELLER_TAG/newTag: ${FLYTEPROPELLER_TAG} # FLYTEPROPELLER_TAG/g"