From a842b7b042ed22edbd37f2c4678fe0121e8aa3a4 Mon Sep 17 00:00:00 2001 From: Yuan Gong Date: Thu, 18 Jun 2020 12:15:36 +0800 Subject: [PATCH] Fix env -> envs transform when pulling kfp upstream manifest --- hack/pull_kfp_upstream.sh | 16 +++++++++++++++- pipeline/.gitignore | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 pipeline/.gitignore diff --git a/hack/pull_kfp_upstream.sh b/hack/pull_kfp_upstream.sh index 3bd8f116e2..4dd950d26b 100755 --- a/hack/pull_kfp_upstream.sh +++ b/hack/pull_kfp_upstream.sh @@ -1,9 +1,23 @@ #!/usr/bin/env bash -export PIPELINES_SRC_REPO=https://github.com/kubeflow/pipelines.git +# Usage: +# This script should be run from kubeflow/manifest repo's root: +# ./hack/pull_kfp_upstream.sh + +set -ex + +# Please edit the following version before running the script to pull new +# pipelines version. export PIPELINES_VERSION=1.0.0-rc.2 +export PIPELINES_SRC_REPO=https://github.com/kubeflow/pipelines.git # Pulling for the first time # kpt pkg get $PIPELINES_SRC_REPO/manifests/kustomize@$PIPELINES_VERSION pipeline/upstream # Updates kpt pkg update pipeline/upstream/@$PIPELINES_VERSION --strategy force-delete-replace +# Before kubeflow/pipelines/manifests/kustomize supports kustomize v3.5+, we +# have to convert kustomization.yaml env to envs syntax, so that it is compatible +# with latest kustomize used in kubeflow/manifests. +# ref: https://github.com/kubeflow/manifests/pull/1248#issuecomment-645739641 +find pipeline/upstream -name 'kustomization.yaml' -exec \ + sed -i.bak 's#env: \(.*\)#envs: ["\1"]#g' {} + diff --git a/pipeline/.gitignore b/pipeline/.gitignore new file mode 100644 index 0000000000..8cbe06ea56 --- /dev/null +++ b/pipeline/.gitignore @@ -0,0 +1,2 @@ +# sed backup files +*.bak