-
Notifications
You must be signed in to change notification settings - Fork 125
Automatically setup a Github webhook URL for the Build #912
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
Conversation
Signed-off-by: Shoubhik Bose <[email protected]>
Signed-off-by: Shoubhik Bose <[email protected]>
This reverts commit a937d8c.
@sbose78: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
type: string | ||
steps: | ||
- image: >- | ||
image-registry.openshift-image-registry.svc:5000/openshift/cli:$(params.VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with the kubectl
Task from TektonHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we could use the cli
, or maybe create a specialized application (like for instance the waiter
, mutate-image
, etc).
// ClusterTriggerBinding "shipwright-executor" will need | ||
// to be shipped as part of the Shipwright installation. | ||
Ref: "shipwright-executor", | ||
Kind: triggersapi.ClusterTriggerBindingKind, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ship this.
// creates the appropriate BuildRun ( and Build, since embedded buildSpec is not | ||
// supported in BuildRuns yet ). | ||
TaskRef: &taskrunapi.TaskRef{ | ||
Name: "shipwright-executor", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ship this.
apiVersion: triggers.tekton.dev/v1alpha1 | ||
kind: ClusterTriggerBinding | ||
metadata: | ||
name: shipwright-executor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Github/Gitlab specific.
Ideally, this would create a Custom Task Run that creates a BuildRun, correct? I think we can get by with creating TaskRuns that create BuildRuns, but I wouldn't want this to be our long-term solution, since it wastes Pod resources. |
Correct. I was mostly checking to see how far we'd get without that. I'm not a fan of two pods per event either 🤦♂️ |
@sbose78: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lifecycle stale |
This scenario will be implemented in https://github.com/shipwright-io/triggers. |
This is an experiment to see if we can automatically setup everything needed for a Build[Run] to be triggered from a Git[Hub] event. This proof-of-concept should work with Github & Gitlab at the most.
Relevant commit
6daa1be
Demo
https://youtu.be/uaBlgTlw1wo
Summary of the flow:
Build
resource, the controller sets up anTriggerTemplate
and anEventListener
automatically without any input in the API.EventListener
as per theTriggerTemplate
triggers creation of aTaskRun
that creates a branch-specific ShipwrightBuild
&BuildRun
such that the image for branchfoo
gets pushed into tagfoo
.Summary of changes:
TriggerTemplate
per `Build.