Skip to content

rewrite build server #1

@cgcgbcbc

Description

@cgcgbcbc
  • Write a gin-gonic/gin handler factory to build a gin handler for github hook event.
    Requirements: PayloadHandler need to unmarshal Github webhook event request into struct.
  • Implement PullRequestHandler
    Requirements: handler should use channel to send event message to worker
  • Implement PushHandler
    Requirements: handler should use channel to send event message to worker
  • Implement a git helper
    • clean: clean a git directory by git command, e.g. git stash
    • checkout: checkout to a given branch
    • clone: clone a git repo
    • fetch: fetch some refs
    • pull: pull refs
  • implement a worker factory which accept a git helper, an incoming channel, an outgoing channel, and a callback channel, returns a worker function that listen to the channel and run build jobs, send logs to the outgoing channel ,send result to callback channel after jobs done success or failure.
  • implement another worker factory which accept a Github token, an incoming channel, returns a worker function that listen to the channel and create Github status.
  • the last worker factory accept a path and a channel to listen, then listen to the channel and create files or write contents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions