Skip to content

Commit

Permalink
Fix release script to replace Katib image tags (#1493)
Browse files Browse the repository at this point in the history
* Fix release script to replace Katib image tags

* Increase restart timeout in e2e
  • Loading branch information
andreyvelich committed Mar 22, 2021
1 parent f83df1b commit acec1e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions scripts/v1beta1/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@ fi
echo -e "\nUpdating Katib image tags to ${TAG}\n"
# For MacOS we should set -i '' to avoid temp files from sed.
if [[ $(uname) == "Darwin" ]]; then
find ./manifests/v1beta1/installs -regex ".*\.yaml" -exec sed -i '' -e "s@newTag: .*@newTag: ${TAG}@" {} \;
sed -i '' -e "s@newTag: .*@newTag: ${TAG}@" ./manifests/v1beta1/installs/katib-external-db/kustomization.yaml
sed -i '' -e "s@:[^[:space:]].*\"@:${TAG}\"@" ./manifests/v1beta1/installs/katib-standalone/katib-config-patch.yaml
sed -i '' -e "s@newTag: .*@newTag: ${TAG}@" ./manifests/v1beta1/installs/katib-standalone/kustomization.yaml
sed -i '' -e "s@newTag: .*@newTag: ${TAG}@" ./manifests/v1beta1/installs/katib-with-kubeflow/kustomization.yaml
else
find ./manifests/v1beta1/installs -regex ".*\.yaml" -exec sed -i -e "s@newTag: .*@newTag: ${TAG}@" {} \;
sed -i -e "s@newTag: .*@newTag: ${TAG}@" ./manifests/v1beta1/installs/katib-external-db/kustomization.yaml
sed -i -e "s@:[^[:space:]].*\"@:${TAG}\"@" ./manifests/v1beta1/installs/katib-standalone/katib-config-patch.yaml
sed -i -e "s@newTag: .*@newTag: ${TAG}@" ./manifests/v1beta1/installs/katib-standalone/kustomization.yaml
sed -i -e "s@newTag: .*@newTag: ${TAG}@" ./manifests/v1beta1/installs/katib-with-kubeflow/kustomization.yaml
fi
echo -e "Katib images have been updated\n"

Expand All @@ -95,7 +101,7 @@ python3 setup.py sdist bdist_wheel
twine upload dist/*
rm -r dist/ build/
cd ../../..
echo -e "Katib Python SDK ${SDK_VERSION} has been published\n"
echo -e "\nKatib Python SDK ${sdk_version} has been published\n"

# ------------------ Commit changes ------------------
git commit -a -m "Katib official release ${TAG}"
Expand All @@ -104,7 +110,7 @@ git tag ${TAG}

# ------------------ Publish Katib images ------------------
# Publish images to the registry with 2 tags: ${TAG} and v1beta1-<commit-sha>
echo -e "Publishing Katib images\n"
echo -e "\nPublishing Katib images\n"
make push-tag TAG=${TAG}
echo -e "Katib images have been published\n"

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/v1beta1/run-e2e-experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func main() {
exp.Name, maxTrials, parallelTrials)

// Wait until Experiment is restarted.
timeout := 10 * time.Second
timeout := 60 * time.Second
endTime := time.Now().Add(timeout)
for time.Now().Before(endTime) {
exp, err = kclient.GetExperiment(exp.Name, exp.Namespace)
Expand Down

0 comments on commit acec1e2

Please sign in to comment.