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

Prototype GitLab support for webhooks #58

Closed
mnuttall opened this issue Jun 11, 2019 · 5 comments
Closed

Prototype GitLab support for webhooks #58

mnuttall opened this issue Jun 11, 2019 · 5 comments
Assignees
Labels

Comments

@mnuttall
Copy link
Contributor

mnuttall commented Jun 11, 2019

GitLab is a popular source control system that many users will wish to integrate with Tekton via webhooks. We currently use the Knative GitHub Event Source which does not support GitLab. This issue is part of Epic #42 which is ranked lower than Epic #40, 'Stop using Knative for webhooks.' Ideally #40 should be progressed before this issue - in particular, we need a clear design for

  • how we expect to register webhooks
  • how we expect to receive them
  • how we expect to trigger pipeline and taskruns as a result

This issue should focus on the GitLab-specific work that must be performed in all cases:

  • Is there a functional Golang library that we can use to register webhooks against GitLab?
  • What forms of credentials are best used?
  • Are the GibLab APIs consistent between the hosted and locally installed versions?

User this issue, develop a working prototype that:

  • Registers a webhook against a locally installed GitLab server
  • Triggers a PipelineRun as a result of a git push
@vincent-pli
Copy link
Member

vincent-pli commented Jun 11, 2019

Please check this knative/eventing-contrib#382
I guess Knative will support gitlab as eventing source soon.

@mnuttall
Copy link
Contributor Author

Thanks for the pointer @vincent-pli - that's a huge pull request :-o

@dibbles dibbles self-assigned this Nov 27, 2019
@dibbles
Copy link
Member

dibbles commented Nov 27, 2019

Will start looking at this after I finish #362 which will give us a client we can use to talk to different git providers.

@dibbles
Copy link
Member

dibbles commented Dec 6, 2019

I have a very hacked together proof-of-concept for some of this:

My Changes:

  1. Create client (GitHub/Gitlab) based on repo URL (as first pass) as create/delete webhook
  2. Modify git pipelineresource to take a tlsVerify flag to disable certificate validation on git commands as using a self signed cert.
  3. Modified interceptor to look for different headers/values
  4. Modified test pipeline triggertemplate/bindings
  5. Modified monitor binding for gitlab

Not verified:

  1. Monitor task not coded for gitlab - would need changing
  2. PullRequest pipelineresource not coded for gitlab - would either need fixing or need monitor task to use gitlab api directly for interactions with the merge request
  3. API endpoints not fully investigated

@dibbles
Copy link
Member

dibbles commented Jan 23, 2020

Prototyped - implemented and delivered

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

No branches or pull requests

3 participants