forked from kubeflow/training-operator
-
Notifications
You must be signed in to change notification settings - Fork 2
/
submit_release_job.sh
executable file
·39 lines (32 loc) · 1.22 KB
/
submit_release_job.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
#!/bin/bash
#
# A simple script to submit the Argo workflow to build the release.
#
# Usage submit_release_job.sh ${COMMIT}
#
# COMMIT=commit to build at
# release workflow will submit to kubeflow-ci until release cluster updated
set -ex
COMMIT=$1
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
JOB_NAME="tf-operator-release"
JOB_TYPE=tf-operator-release
BUILD_NUMBER=$(uuidgen)
BUILD_NUMBER=${BUILD_NUMBER:0:4}
REPO_OWNER=kubeflow
REPO_NAME=tf-operator
ENV=test
DATE=`date +%Y%m%d`
PULL_BASE_SHA=${COMMIT:0:8}
VERSION_TAG="v${DATE}-${PULL_BASE_SHA}"
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},PULL_BASE_SHA=${PULL_BASE_SHA}"
cd ${ROOT}/test/workflows
ks param set --env=${ENV} workflows namespace kubeflow-test-infra
ks param set --env=${ENV} workflows name "${JOB_NAME}-${PULL_BASE_SHA}-${USER}"
ks param set --env=${ENV} workflows prow_env "${PROW_VAR}"
ks param set --env=${ENV} workflows versionTag "${VERSION_TAG}"
ks param set --env=${ENV} workflows registry gcr.io/kubeflow-images-public
ks param set --env=${ENV} workflows bucket kubeflow-releasing-artifacts
ks apply ${ENV} -c workflows