From 12617ae0887c374ca195dcbff5159b8f43a43e01 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 24 Jun 2024 22:16:17 -0700 Subject: [PATCH] Retag flyteagent image upon release Signed-off-by: Eduardo Apolinario --- .github/workflows/create_release.yml | 3 +++ charts/flyteagent/values.yaml | 2 +- script/prepare_artifacts.sh | 3 +++ script/release.sh | 3 +-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 152c1cd042..8fc6586901 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -88,6 +88,7 @@ jobs: [ datacatalog, flyteadmin, + flyteagent, flyteconsole, flytecopilot, flytepropeller, @@ -107,6 +108,8 @@ jobs: run: | if [ ${{ matrix.component }} = "flytecopilot" ]; then echo ::set-output name=version::$(yq eval '.configmap.copilot.plugins.k8s.co-pilot.image' charts/flyte-core/values.yaml | cut -d ":" -f 2 ) + elif [ ${{ matrix.component }} = "flyteagent" ]; then + echo ::set-output name=version::$(yq eval '.${{ matrix.component }}.image.tag' charts/flyteagent/values.yaml) else echo ::set-output name=version::$(yq eval '.${{ matrix.component }}.image.tag' charts/flyte-core/values.yaml) fi diff --git a/charts/flyteagent/values.yaml b/charts/flyteagent/values.yaml index 4d02d59454..d5123c3d2e 100755 --- a/charts/flyteagent/values.yaml +++ b/charts/flyteagent/values.yaml @@ -21,7 +21,7 @@ agentSecret: replicaCount: 1 image: # -- Docker image for flyteagent deployment - repository: ghcr.io/flyteorg/flyteagent + repository: cr.flyte.org/flyteorg/flyteagent # FLYTEAGENT_IMAGE # -- Docker image tag tag: 1.12.1-rc0 # FLYTEAGENT_TAG # -- Docker image pull policy diff --git a/script/prepare_artifacts.sh b/script/prepare_artifacts.sh index 159ce40d7d..3893da8527 100644 --- a/script/prepare_artifacts.sh +++ b/script/prepare_artifacts.sh @@ -62,3 +62,6 @@ sed -i "s,repository:[^P]*# FLYTE_IMAGE,repository: cr.flyte.org/flyteorg/flyte- sed -i "s,tag:[^P]*# FLYTE_TAG,tag: ${VERSION} # FLYTE_TAG," ./charts/flyte-binary/values.yaml sed -i "s,repository:[^P]*# FLYTECOPILOT_IMAGE,repository: cr.flyte.org/flyteorg/flytecopilot-release # FLYTECOPILOT_IMAGE," ./charts/flyte-binary/values.yaml sed -i "s,tag:[^P]*# FLYTECOPILOT_TAG,tag: ${VERSION} # FLYTECOPILOT_TAG," ./charts/flyte-binary/values.yaml + +sed -i "s,tag:[^P]*# FLYTEAGENT_TAG,tag: ${VERSION} # FLYTEAGENT_TAG," ./charts/flyteagent/values.yaml +sed -i "s,repository:[^P]*# FLYTEAGENT_IMAGE,repository: cr.flyte.org/flyteorg/flyteagent-release # FLYTEAGENT_IMAGE," ./charts/flyteagent/values.yaml diff --git a/script/release.sh b/script/release.sh index 056ee1e253..9816fb6a7c 100755 --- a/script/release.sh +++ b/script/release.sh @@ -2,8 +2,7 @@ set -ex -# NOTE: Flyte and flytekit should be released at the same time. If not, Flyte chart will use a flyteagent image that does not exist. -FLYTEKIT_TAG=$(echo "${VERSION}" | sed 's/^v//') +FLYTEKIT_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/flytekit/releases/latest" | jq -r .tag_name | sed 's/^v//') FLYTECONSOLE_TAG=$(curl --silent "https://api.github.com/repos/flyteorg/flyteconsole/releases/latest" | jq -r .tag_name) # bump latest release of flyte component in helm