Skip to content

Commit

Permalink
Add support for release-postprocessing
Browse files Browse the repository at this point in the history
Add a cloud event pipeline resource to the publish-tekton-pipelines
Task. This can be used to trigger post-processing services like
log collection and automatic post release testing.

Add a resource to the pipeline-release and to the
pipeline-release-nightly-triggers pipelines to match the Task one.
  • Loading branch information
afrittoli committed Oct 23, 2019
1 parent ad69254 commit 115892c
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
23 changes: 22 additions & 1 deletion 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.
In 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 @@ -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

0 comments on commit 115892c

Please sign in to comment.