Giter Club home page Giter Club logo

cicd-operator's People

Contributors

changjjjjjjj avatar chanwook-lee avatar clee94713 avatar cqbqdd11519 avatar kyung-hoon avatar s-hayeon avatar sangwl9 avatar yxzzzxh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cicd-operator's Issues

Improve configs controller

Currently, config controller is tightly coupled with controller (a.k.a. manager).

As we are implementing blocker, which is planned to be an independent binary itself, it should be able to parse its own configs from config map.

Enable pagination for git clients

GitHub/GitLab APIs support paginations and only return fixed amount of items per request.
The client should be able to handle the pagination

Support batch test using IntegrationJob

It is required to test multiple PRs at once (i.e., IntegrationJob's jobs are executed against the code where all the target PRs are merged into), to reduce time consumed for re-testing before block-merge.

Implement chat-ops

What we need

  • Commenting for pull requests, with /test or /test <job name> should trigger the jobs
  • /lgtm or /approve should be implemented (those comments not actually approves the pull request, but labels it so that merge automation module(#11) decides if it's mergeable or not)

Handle 'extension-apiserver-authentication' update

  • Desired Behavior

    • Whenever the configmap extension-apiserver-authentication of kube-system namespace is updated, restart API server with trusting the updated CA.
  • Current Behavior

    • If the configmap is updated, error log occurs on service discovery

Pipeline manager implementation

What do we need

  • PipelineRun creation logic from IntegrationJob
  • Logic to report current status of given PipelineRun to remote git server

Implementation Goal

IntegrationConfig controller implementation

What do we need

  • Validate token given to IntegrationConfig spec
  • Register webhook to remote git server when IntegrationConfig is created
  • Secret (has git/docker credentials), ServiceAccount (with the secret, used for running PipelineRun)

Implementation Goal

Scheduler Implementation

What do we need

  • Scheduling policy to prevent resource hogging
  • Scheduling logic from IntegrationJob to PipelineRun

Implementation Goal

  • Triggered by IntegrationJob controller

Send Approval result email to sender, not approver

  • Desired Behavior

    • Approval result mail is sent the sender (who pushed or requested pull request)
  • Current Behavior

    • Approval result mail is sent to the approvers
  • Possible Solution

    • Modify spec.sender filed of Approval object as an object with keys name and email.
    • Modify spec.refs.sender field of IntegrationJob object as an object with keys name and email.
    • Modify git webhooks to parse sender email, by calling GitHub/GitLab's user APIs
    • Modify dispatcher to add email to IntegrationJob
    • Modify approval_run_controller to add email to Approval
    • Send approval results to Approval's sender.email

Git client implementation

What do we need

  • git client interface
  • GitHub/GitLab client that implements git client interface

Implementation Goal

  • Webhook Header validation
    • Content-Type: application/json
    • (For GitHub) X-GitHub-Event should exist
    • (For GitLab) X-Gitlab-Event should exist
  • Webhook Body validation
  • Webhook parser to convert webhook body to common-struct
  • API calls
    • Register webhook to git repository
    • Add commit status

We need approved plugin for chat-ops

If one of the code owners comment /approve to a PR, then approved label should be set.

Also, if one of the code owners approve the PR by using git's approval feature, approved label should be set.

Add base SHA to IntegrationJob on PreSubmit jobs

(Prerequisite for #189)

Currently, IntegrationJob does not have base (target branch's) SHA for presubmit jobs.
This is because GitLab's MergeRequest webhook payload does not contain it.

Maybe we should make a get request for target_branch to get the SHA (only for gitlab)

Webhook server implementation

What do we need

  • API handler for endpoint : /webhook/<Namespace>/<IntegrationConfig Name> - for git event webhook

Implementation Goal

  • Get IntegrationConfig object and get git type โ†’ create git client for the type
  • Call webhook validation function of the git client
  • Convert the webhook body to common-struct โ†’ call dispatcher to create IntegrationJob

Dispatcher implementation

What do we need

  • Logic to convert common webhook structure to IntegrationJob spec

Implementation Goal

  • Filter out webhook bodies with event types other than push/pull_request
  • Filter out jobs that does not match conditions specified in when

Make git.token NOT required

We need to support following scenarios.

Scenario 1

  • A user want to trigger IntegrationConfig's jobs manually only, not via git events
  • Then we do not need the admin acess token for registering webhook

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.