-
Notifications
You must be signed in to change notification settings - Fork 5
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
[WIP] Add taskcluster pulse support. #18
Conversation
578d82b
to
ab8dc22
Compare
The job triggering definitely needs fleshing out, and it may be that this should be a separate service. It doesn't need to be publicly accessible, as it connects to outbound to pulse to listen. |
I'm guessing there is no generic functionality in taskcluster to generate a webhook when a certain event happens (i.e. like github or dockerhub webhooks)? Thus the need to hook the deployment proxy into pulse, or build a new service that listens to pulse and generates webhooks to the deployment proxy? |
There isn't currently a generic webhook functionality in taskcluster. We could have a docker-worker task that calls an http endpoint, but if we wanted to authenticate that call, we'd need to store some sort of credentials for it in taskcluster, which this set of PRs is working to move away from needing to do. |
main.go
Outdated
EnvVar: "CLOUDOPS_PULSE_PREFIX", | ||
}, | ||
cli.StringFlag{ | ||
Name: "pulse-queue", |
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.
Looks like this setting isn't used anywhere.
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.
It should be passed to the pulse connection. I wrote this a while ago, but I suspect I wanted to use an anonymous queue for testing locally.
proxyservice/jenkins.go
Outdated
@@ -116,3 +116,25 @@ func (j *Jenkins) TriggerDockerhubJob(data *DockerHubWebhookData) error { | |||
params.Set("RawJSON", string(rawJSON)) | |||
return j.TriggerJob(path, params) | |||
} | |||
|
|||
// triggers a jenkins job given | |||
func (j *Jenkins) TriggerTaskclusterJob(taskID string, route string, data *TaskCompletedMessage) error { |
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.
Can you document what route will look like?
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.
I've added my initial thoughts on what this would look like here.
8c0d3b9
to
4443dd6
Compare
(rebased on #22) |
4443dd6
to
6683e09
Compare
Closing in favor of #22 |
6683e09
to
7c1e727
Compare
This enables listening to taskcluster pulse messages, and triggering jenkins to pull from taskcluster.
This depends on mozilla-releng/scriptworker#371 and https://github.com/mozilla-services/cloudops-infra-deploylib/pull/99