Skip to content

Commit

Permalink
fix bunch of issues in prow test (#866)
Browse files Browse the repository at this point in the history
* update tests

* explicit return successful

* fix

* move variable

* Update deploy-kubeflow.sh
  • Loading branch information
IronPan authored and k8s-ci-robot committed Feb 27, 2019
1 parent b3dee05 commit 18878f1
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
2 changes: 2 additions & 0 deletions test/check-argo-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -ex

ARTIFACT_DIR=$WORKSPACE/_artifacts
WORKFLOW_COMPLETE_KEYWORD="completed=true"
WORKFLOW_FAILED_KEYWORD="phase=Failed"
Expand Down
12 changes: 7 additions & 5 deletions test/deploy-kubeflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)"
set -ex

TEST_CLUSTER_PREFIX=${WORKFLOW_FILE%.*}
TEST_CLUSTER=$(echo $TEST_CLUSTER_PREFIX | cut -d _ -f 1)-${PULL_BASE_SHA:0:7}-${RANDOM}
# Install ksonnet
KS_VERSION="0.13.0"

curl -LO https://github.com/ksonnet/ksonnet/releases/download/v${KS_VERSION}/ks_${KS_VERSION}_linux_amd64.tar.gz
tar -xzf ks_${KS_VERSION}_linux_amd64.tar.gz
chmod +x ./ks_${KS_VERSION}_linux_amd64/ks
Expand Down Expand Up @@ -49,13 +50,14 @@ KFAPP=${TEST_CLUSTER}

function clean_up {
echo "Clean up..."
cd ${KFAPP}
cd ${DIR}/${KFAPP}
${KUBEFLOW_SRC}/scripts/kfctl.sh delete all
# delete the storage
gcloud deployment-manager --project=${PROJECT} deployments delete ${KFAPP}-storage --quiet
}
trap clean_up EXIT SIGINT SIGTERM

cd ${DIR}
${KUBEFLOW_SRC}/scripts/kfctl.sh init ${KFAPP} --platform ${PLATFORM} --project ${PROJECT} --skipInitProject

cd ${KFAPP}
Expand All @@ -64,4 +66,4 @@ ${KUBEFLOW_SRC}/scripts/kfctl.sh apply platform
${KUBEFLOW_SRC}/scripts/kfctl.sh generate k8s
${KUBEFLOW_SRC}/scripts/kfctl.sh apply k8s

gcloud container clusters get-credentials ${TEST_CLUSTER}
gcloud container clusters get-credentials ${TEST_CLUSTER}
5 changes: 2 additions & 3 deletions test/deploy-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -ex


usage()
Expand Down Expand Up @@ -43,8 +43,7 @@ while [ "$1" != "" ]; do
shift
done

cd ${KUBEFLOW_SRC}
cd ${KFAPP}
cd ${DIR}/${KFAPP}

## Update pipeline component image
pushd ks_app
Expand Down
2 changes: 2 additions & 0 deletions test/install-argo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -ex

kubectl config set-context $(kubectl config current-context) --namespace=default
echo "Add necessary cluster role bindings"
ACCOUNT=$(gcloud info --format='value(config.account)')
Expand Down
4 changes: 2 additions & 2 deletions test/postsubmit-tests-with-pipeline-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -ex

usage()
{
Expand Down Expand Up @@ -61,7 +61,7 @@ while [ "$1" != "" ]; do
shift
done

#Variables
# Variables
# Refer to https://github.com/kubernetes/test-infra/blob/e357ffaaeceafe737bd6ab89d2feff132d92ea50/prow/jobs.md for the Prow job environment variables
TEST_RESULTS_GCS_DIR=gs://${TEST_RESULT_BUCKET}/${PULL_BASE_SHA}/${TEST_RESULT_FOLDER}
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)"
Expand Down
2 changes: 1 addition & 1 deletion test/presubmit-tests-with-pipeline-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -ex

usage()
{
Expand Down
3 changes: 0 additions & 3 deletions test/test-prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ remote_code_archive_uri="${code_archive_prefix}_${PULL_BASE_SHA}_${date_string}.

tar -czf "$local_code_archive_file" .
gsutil cp "$local_code_archive_file" "$remote_code_archive_uri"

TEST_CLUSTER_PREFIX=${WORKFLOW_FILE%.*}
TEST_CLUSTER=$(echo $TEST_CLUSTER_PREFIX | cut -d _ -f 1)-${PULL_BASE_SHA:0:7}-${RANDOM}

0 comments on commit 18878f1

Please sign in to comment.