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

[WIP] Add taskcluster pulse support. #18

Closed
wants to merge 2 commits into from

Conversation

tomprince
Copy link
Contributor

@tomprince tomprince commented Dec 6, 2019

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

@sciurus sciurus assigned oremj and unassigned oremj Dec 6, 2019
@sciurus sciurus requested a review from oremj December 6, 2019 16:52
@tomprince tomprince force-pushed the taskcluster-support branch from 578d82b to ab8dc22 Compare December 6, 2019 21:36
@tomprince
Copy link
Contributor Author

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.

@sciurus
Copy link
Contributor

sciurus commented Dec 17, 2019

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?

@tomprince
Copy link
Contributor Author

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.

@oremj oremj mentioned this pull request Mar 23, 2020
main.go Outdated
EnvVar: "CLOUDOPS_PULSE_PREFIX",
},
cli.StringFlag{
Name: "pulse-queue",
Copy link
Contributor

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.

Copy link
Contributor Author

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.

main.go Outdated Show resolved Hide resolved
@@ -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 {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@tomprince
Copy link
Contributor Author

(rebased on #22)

@tomprince tomprince force-pushed the taskcluster-support branch from 4443dd6 to 6683e09 Compare March 25, 2020 01:58
@oremj
Copy link
Contributor

oremj commented Mar 27, 2020

Closing in favor of #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants