Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
Add releasing instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jose5918 committed Apr 24, 2018
1 parent fbd8f8c commit 7b91b9e
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 1 deletion.
48 changes: 48 additions & 0 deletions releasing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Releasing the TFJob operator

Permissions

* You need to be a member of release-team@kubeflow.org to have access to the GCP
resources used for releasing.

* You need write permissions on the repository to create a release branch.

Use the GitHub UI to cut a release branch
* Name the release branch v{MAJOR}.${MINOR}-branch

Checkout the release branch

We build TFJob operator by running the E2E test workflow.

Look at the [postsubmit dashboard](https://k8s-testgrid.appspot.com/sig-big-data#kubeflow-pytorch-operator-postsubmit)
to find the latest green postsubmit.

Check out that commit (in this example, we'll use `6214e560`):

Run the E2E test workflow using our release cluster

[kubeflow/testing#42](https://github.com/kubeflow/testing/issues/42) will simplify this.

```
submit_release_job.sh ${COMMIT}
```

You can monitor the workflow using the Argo UI. For our release cluster, we don't expose the Argo UI publicly, so you'll need to connect via kubectl port-forward:

```
kubectl -n kubeflow-releasing port-forward `kubectl -n kubeflow-releasing get pods --selector=app=argo-ui -o jsonpath='{.items[0].metadata.name}'` 8080:8001
```

[kubeflow/testing#43](https://github.com/kubeflow/testing/issues/43) is tracking setup of IAP to make this easier.

Make sure the Argo workflow completes successfully.
Check the junit files to make sure there were no actual test failures.
The junit files will be in [gs://kubeflow-releasing-artifacts](https://console.cloud.google.com/storage/browser/kubeflow-releasing-artifacts/logs/kubeflow_tf-operator/tf-operator-release/?project=kubeflow-releasing).
* The build artifacts will be in a directory named after the build number

If the tests pass use the GitHub UI to create a release tagged v{MAJOR}-{MINOR}-{PATCH}
* If its an RC append -RC.N
* In the notes create a link to the Docker image in GCR
* For the label use the `sha256` and not the label so it is immutable.

To release new ksonnet configs with the image following [kubeflow/kubeflow/releasing.md](https://github.com/kubeflow/kubeflow/blob/master/docs_dev/releasing.md).
36 changes: 36 additions & 0 deletions submit_release_job.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/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
set -ex

COMMIT=$1

ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

JOB_NAME="pytorch-operator-release"
JOB_TYPE=pytorch-operator-release
BUILD_NUMBER=$(uuidgen)
BUILD_NUMBER=${BUILD_NUMBER:0:4}
REPO_OWNER=kubeflow
REPO_NAME=pytorch-operator
ENV=releasing
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-releasing
ks param set --env=${ENV} workflows name "${USER}-${JOB_NAME}-${PULL_BASE_SHA}-${BUILD_NUMBER}"
ks param set --env=${ENV} workflows prow_env "${PROW_VAR}"
ks param set --env=${ENV} workflows versionTag "${VERSION_TAG}"
ks apply ${ENV} -c workflows
2 changes: 1 addition & 1 deletion test/workflows/environments/releasing/params.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ params + {
name: "jlewi-tf-operator-release-403-2f58",
namespace: "kubeflow-releasing",
project: "kubeflow-releasing",
prow_env: "JOB_NAME=tf-operator-release,JOB_TYPE=presubmit,PULL_NUMBER=403,REPO_NAME=tf-operator,REPO_OWNER=kubeflow,BUILD_NUMBER=2f58",
prow_env: "JOB_NAME=pytorch-operator-release,JOB_TYPE=presubmit,PULL_NUMBER=403,REPO_NAME=tf-operator,REPO_OWNER=kubeflow,BUILD_NUMBER=2f58",
registry: "gcr.io/kubeflow-images-public",
versionTag: "v20180226-403",
zone: "us-central1-a",
Expand Down

0 comments on commit 7b91b9e

Please sign in to comment.