Skip to content

Commit

Permalink
[test] fix variable overriding (kubeflow#743)
Browse files Browse the repository at this point in the history
rename the variable in the script to avoid using the variable in
the build.properties
also add more time for waiting the kfp-tekton deployment

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
  • Loading branch information
yhwang committed Oct 4, 2021
1 parent d15acfd commit c835d14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/deploy/iks/deploy-kfp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -ex
# - KUBEFLOW_NS: namespace for kfp-tekton, defulat: kubeflow

MAX_RETRIES="${MAX_RETRIES:-5}"
SLEEP_TIME="${SLEEP_TIME:-10}"
SLEEP_TIME="${SLEEP_TIME:-20}"
EXIT_CODE=0

KUSTOMIZE_DIR="${KUSTOMIZE_DIR:-"manifests/kustomize/env/platform-agnostic"}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ KUBECTL_WRAPPER_IMAGE_URL="${KUBECTL_WRAPPER_IMAGE_URL:=docker.io/aipipeline/kub
IMAGE_TAG="${IMAGE_TAG:=nightly}"

BUILD_DIR="sdk/python/tests/compiler/testdata"
MANIFEST="${MANIFEST:="resourceop_basic.yaml"}"

pushd $BUILD_DIR > /dev/null
RESOURCE_MANIFEST="${RESOURCE_MANIFEST:="resourceop_basic.yaml"}" pushd $BUILD_DIR > /dev/null

# Ensure image fields exists
yq eval --exit-status '.spec.pipelineSpec.tasks[0].taskSpec.params[] | select(.name == "image") | .default' $MANIFEST
yq eval --exit-status '.spec.pipelineSpec.tasks[0].taskSpec.params[] | select(.name == "image") | .default' $RESOURCE_MANIFEST

# Replace images inplace
yq eval --inplace ''".spec.pipelineSpec.tasks[0].taskSpec.params[] |= select(.name == \"image\") |= .default = \"$KUBECTL_WRAPPER_IMAGE_URL:$IMAGE_TAG\""'' $MANIFEST
yq eval --inplace ''".spec.pipelineSpec.tasks[0].taskSpec.params[] |= select(.name == \"image\") |= .default = \"$KUBECTL_WRAPPER_IMAGE_URL:$IMAGE_TAG\""'' $RESOURCE_MANIFEST

popd > /dev/null

0 comments on commit c835d14

Please sign in to comment.