-
Notifications
You must be signed in to change notification settings - Fork 10
/
run_code_search_test.sh
executable file
·46 lines (40 loc) · 1.32 KB
/
run_code_search_test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -ex
JOB_NAME="code-search-test"
JOB_TYPE=presubmit
#BUILD_NUMBER=$(uuidgen)
#BUILD_NUMBER=${BUILD_NUMBER:0:4}
BUILD_NUMBER=$(date +%m%d-%H%M%S)
REPO_OWNER=kubeflow
REPO_NAME=examples
ENV=test
DATE=`date +%Y%m%d`
NAMESPACE=kubeflow-test-infra
PULL_NUMBER=446
# Don't set PULL_PULL_SHA if you want to pull the head of the PR.
# PULL_PULL_SHA=0bc73dc
PROW_VAR="JOB_NAME=${JOB_NAME},JOB_TYPE=${JOB_TYPE},REPO_NAME=${REPO_NAME}"
PROW_VAR="${PROW_VAR},REPO_OWNER=${REPO_OWNER},BUILD_NUMBER=${BUILD_NUMBER}"
PROW_VAR="${PROW_VAR},BUILD_ID=${BUILD_NUMBER}"
WORKFLOW=code_search
if [ "${JOB_TYPE}" == "presubmit" ]; then
PROW_VAR="${PROW_VAR},PULL_NUMBER=${PULL_NUMBER}"
if [ ! -z "${PULL_PULL_SHA}" ]; then
PROW_VAR="${PROW_VAR},PULL_PULL_SHA=${PULL_PULL_SHA}"
fi
VERSION_TAG="v${DATE}-pr${PULL_NUMBER}-${PULL_PULL_SHA}-${BUILD_NUMBER}"
fi
pushd .
cd ~/git_kubeflow-examples/test/workflows
NAME="${USER}-${JOB_NAME}-${PULL_NUMBER}-${BUILD_NUMBER}"
ks param set --env=${ENV} ${WORKFLOW} namespace "${NAMESPACE}"
ks param set --env=${ENV} ${WORKFLOW} name ${NAME}
ks param set --env=${ENV} ${WORKFLOW} prow_env "${PROW_VAR}"
ks apply ${ENV} -c ${WORKFLOW}
popd
kubectl get wf -o yaml ${NAME}
echo WORKFLOW=${NAME}
echo UI URL
URL=http://testing-argo.kubeflow.org/workflows/kubeflow-test-infra/${NAME}
echo ${URL}
google-chrome ${URL}&