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

Add support for release-postprocessing #1457

Merged
merged 1 commit into from
Oct 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 23 additions & 2 deletions tekton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ To use [`tkn`](https://github.com/tektoncd/cli) to run the `publish-tekton-pipel
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 use release post-processing services, update the
[`resources.yaml`](./resources.yaml) file to add a valid targetURL in the
cloud event `PipelineResoruce` named `post-release-trigger`:

```yaml
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: post-release-trigger
spec:
type: cloudEvent
params:
- name: targetURI
value: http://el-pipeline-release-post-processing.default.svc.cluster.local:8080 # This has to be changed to a valid URL
```

The targetURL should point to the event listener configured in the cluster.
The example above is configured with the correct value for the `dogfooding`
cluster.

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
Expand Down Expand Up @@ -101,7 +121,7 @@ To use [`tkn`](https://github.com/tektoncd/cli) to run the `publish-tekton-pipel

tkn pipeline start \
--param=versionTag=${VERSION_TAG} \
--param=imageRegistry=${IMAGE_REGISTRY} \
--param=imageRegistry=${IMAGE_REGISTRY} \
--serviceaccount=release-right-meow \
--resource=source-repo=tekton-pipelines-git \
--resource=bucket=tekton-bucket \
Expand All @@ -117,7 +137,8 @@ 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 \
--resource=builtGcsFetcherImage=gcs-fetcher-image \
--resource=notification=post-release-trigger
pipeline-release
```

Expand Down
2 changes: 2 additions & 0 deletions tekton/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ spec:
type: image
- name: builtGcsFetcherImage
type: image
- name: notification
type: cloudEvent
steps:

- name: build-push-base-images
Expand Down
4 changes: 4 additions & 0 deletions tekton/release-pipeline-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ spec:
type: image
- name: builtGcsFetcherImage
type: image
- name: notification
type: cloudEvent
tasks:
- name: lint
taskRef:
Expand Down Expand Up @@ -242,3 +244,5 @@ spec:
resource: builtPullRequestInitImage
- name: builtGcsFetcherImage
resource: builtGcsFetcherImage
- name: notification
resource: notification
4 changes: 4 additions & 0 deletions tekton/release-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ spec:
type: image
- name: builtGcsFetcherImage
type: image
- name: notification
type: cloudEvent
tasks:
- name: precheck
taskRef:
Expand Down Expand Up @@ -139,3 +141,5 @@ spec:
resource: builtPullRequestInitImage
- name: builtGcsFetcherImage
resource: builtGcsFetcherImage
- name: notification
resource: notification
10 changes: 10 additions & 0 deletions tekton/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,13 @@ spec:
params:
- name: url
value: vendor/github.com/googlecloudplatform/cloud-builders/gcs-fetcher/cmd/gcs-fetcher # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: post-release-trigger
spec:
type: cloudEvent
params:
- name: targetURI
value: http://post-release-trigger-sink # This has to be changed to a valid URL