Skip to content

Commit

Permalink
Use the pre-release check task from plumbing
Browse files Browse the repository at this point in the history
Add the pre-release check task to the release pipeline, to ensure
we don't override an existing release by mistake.

Also fix the README to specify the correct setup for the nightly
release pipeline and the manual release pipeline.

Closes #983
  • Loading branch information
afrittoli authored and tekton-robot committed Oct 17, 2019
1 parent ea94852 commit cc2474f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
32 changes: 28 additions & 4 deletions tekton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,23 @@ The nightly release Pipeline is currently missing Tasks which we want to add onc

## Install Tekton

The Pipelines and Tasks in this repo work with v0.3.1 due to
Some of the Pipelines and Tasks in this repo work with v0.3.1 due to
[Prow #13948](https://github.com/kubernetes/test-infra/issues/13948), so that
they can be used [with Prow](https://github.com/tektoncd/plumbing/tree/master/prow).

Specifically, nightly releases are triggered by Prow, so they are compatible with
v0.3.1, while full releases are triggered manually and require Tekton >= v0.7.0.

```bash
# If this is your first time installing Tekton in the cluster you might need to give yourself permission to do so
kubectl create clusterrolebinding cluster-admin-binding-someusername \
--clusterrole=cluster-admin \
--user=$(gcloud config get-value core/account)
# Apply version v0.3.1 of Tekton
# For Tekton v0.3.1 - apply version v0.3.1
kubectl apply --filename https://storage.googleapis.com/tekton-releases/previous/v0.3.1/release.yaml
# For Tekton v0.7.0 - apply version v0.7.0 - Do not apply both versions in the same cluster!
kubectl apply --filename https://storage.googleapis.com/tekton-releases/previous/v0.3.1/release.yaml
```

Expand All @@ -164,15 +169,34 @@ kubectl apply --filename https://storage.googleapis.com/tekton-releases/previou
Add all the `Tasks` to the cluster, including the
[`golang`](https://github.com/tektoncd/catalog/tree/master/golang)
Tasks from the
[`tektoncd/catalog`](https://github.com/tektoncd/catalog) (pinned to a version that
works [with v0.3.1](#install-tekton))
[`tektoncd/catalog`](https://github.com/tektoncd/catalog), and the
[release pre-check](https://github.com/tektoncd/plumbing/tree/master/tekton/) Task from
[`tektoncd/plumbing`](https://github.com/tektoncd/plumbing).

For nightly releases, use a version of the [`tektoncdcatalog`](https://github.com/tektoncd/catalog)
tasks that is compatible with Tekton v0.3.1:

```bash
# Apply the Tasks we are using from the catalog
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/14d38f2041312b0ad17bc079cfa9c0d66895cc7a/golang/lint.yaml
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/14d38f2041312b0ad17bc079cfa9c0d66895cc7a/golang/build.yaml
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/14d38f2041312b0ad17bc079cfa9c0d66895cc7a/golang/tests.yaml
```

For full releases, use a version of the [`tektoncdcatalog`](https://github.com/tektoncd/catalog)
tasks that is compatible with Tekton v0.7.0 (`master`) and install the pre-release
check Task from plumbing too:

```bash
# Apply the Tasks we are using from the catalog
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/golang/lint.yaml
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/golang/build.yaml
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/golang/tests.yaml
kubectl apply -f https://raw.githubusercontent.com/tektoncd/plumbing/master/tekton/prerelease_checks.yaml
```

Apply the tasks from the `pipeline` repo:
```bash
# Apply the Tasks and Pipelines we use from this repo
kubectl apply -f tekton/ci-images.yaml
kubectl apply -f tekton/publish.yaml
Expand Down
15 changes: 15 additions & 0 deletions tekton/release-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,22 @@ spec:
- name: builtGcsFetcherImage
type: image
tasks:
- name: precheck
taskRef:
name: prerelease-check
params:
- name: package
value: $(params.package)
- name: versionTag
value: $(params.versionTag)
resources:
inputs:
- name: release-bucket
resource: bucket
- name: source-to-release
resource: source-repo
- name: lint
runAfter: [precheck]
taskRef:
name: golangci-lint
params:
Expand Down

0 comments on commit cc2474f

Please sign in to comment.