Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes to the release guide #1322

Merged
merged 2 commits into from
Sep 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions tekton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ To start from scratch and use these Pipelines and Tasks:

Official releases are performed from [the `prow` cluster](https://github.com/tektoncd/plumbing#prow)
[in the `tekton-releases` GCP project](https://github.com/tektoncd/plumbing/blob/master/gcp.md).
This cluster
[already has the correct version of Tekton installed](#install-tekton).
This cluster [already has the correct version of Tekton installed](#install-tekton).

To make a new release:

Expand All @@ -37,8 +36,8 @@ To make a new release:
1. Create the new tag and release in GitHub
([see one of way of doing that here](https://github.com/tektoncd/pipeline/issues/530#issuecomment-477409459)).
_TODO(#530): Automate as much of this as possible with Tekton._
1. Add an entry to [the README](../README.md) at `HEAD` for docs and examples for the new release
([README.md#read-the-docs](README.md#read-the-docs)).
1. Add an entry to [the README](../README.md) at `HEAD` for docs and examples for
the new release ([README.md#read-the-docs](../README.md#read-the-docs)).
1. Update the new release in GitHub with the same links to the docs and examples, see
[v0.1.0](https://github.com/tektoncd/pipeline/releases/tag/v0.1.0) for example.

Expand All @@ -54,28 +53,29 @@ To use [`tkn`](https://github.com/tektoncd/cli) to run the `publish-tekton-pipel
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: tekton-pipelines-vX-Y-
name: tekton-pipelines-vX-Y-Z
spec:
type: git
params:
- name: url
value: https://github.com/tektoncd/pipeline
- name: revision
value: vX.Y.Z-invalid-tags-boouuhhh # REPLACE with the commit you'd like to build from
value: revision-for-vX.Y.Z-invalid-tags-boouuhhh # REPLACE with the commit you'd like to build from (not a tag, since that's not created yet)
```

1. To run against your own infrastructure (if you are running
[in the production cluster](https://github.com/tektoncd/plumbing#prow) the default account should
already have these creds, this is just a bonus - plus `release-right-meow` might already exist in the
cluster!), also setup the required credentials for the `release-right-meow` service account, either:
[in the production cluster](https://github.com/tektoncd/plumbing#prow) the
default account should already have these creds, this is just a bonus - plus
`release-right-meow` might already exist in the cluster!), also setup the
required credentials for the `release-right-meow` service account, either:

- For
[the GCP service account `[email protected]`](#production-service-account)
which has the proper authorization to release the images and yamls in
[our `tekton-releases` GCP project](https://github.com/tektoncd/plumbing#prow)
- For
[your own GCP service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
if running against your own infrastructureZ
if running against your own infrastructure


1. [Connect to the production cluster](https://github.com/tektoncd/plumbing#prow):
Expand All @@ -86,17 +86,22 @@ To use [`tkn`](https://github.com/tektoncd/cli) to run the `publish-tekton-pipel

1. Run the `release-pipeline` (assuming you are using the production cluster and
[all the Tasks and Pipelines already exist](#setup)):

```shell
# Create the resoruces - i.e. set the revision that you wan to build from
kubectl apply -f tekton/resources.yaml

# Change the environment variable to the version you would like to use.
# Be careful: due to #983 it is possible to overwrite previous releases.
export VERSION_TAG=v0.X.Y
export IMAGE_REGISTRY=gcr.io/tekton-releases

# Double-check the git revision that is going to be used for the release:
kubectl get pipelineresource/tekton-pipelines-git -o=jsonpath="{'Target Revision: '}{.spec.params[?(@.name == 'revision')].value}{'\n'}"

tkn pipeline start \
--param=versionTag=${VERSION_TAG} \
--param=imageRegistry=${IMAGE_REGISTRY} \
afrittoli marked this conversation as resolved.
Show resolved Hide resolved
--serviceaccount=release-right-meow \
--resource=source-repo=tekton-pipelines-git \
--resource=bucket=tekton-bucket \
Expand All @@ -112,6 +117,7 @@ To use [`tkn`](https://github.com/tektoncd/cli) to run the `publish-tekton-pipel
--resource=builtWebhookImage=webhook-image \
--resource=builtDigestExporterImage=digest-exporter-image \
--resource=builtPullRequestInitImage=pull-request-init-image \
--resource=builtGcsFetcherImage=gcs-fetcher-image \
pipeline-release
```

Expand Down Expand Up @@ -219,7 +225,7 @@ ACCOUNT=release-right-meow
GCP_ACCOUNT="[email protected]"

# 1. Create a private key for the service account
gcloud iam service-accounts keys create --iam-account $GCP_ACCOUNT $KEY_FILE
gcloud iam service-accounts keys create $KEY_FILE --iam-account $GCP_ACCOUNT

# 2. Create kubernetes secret, which we will use via a service account and directly mounting
kubectl create secret generic $GENERIC_SECRET --from-file=./$KEY_FILE
Expand Down