Uploaded image for project: 'GPII - Global Public Inclusive Infrastructure'
  1. GPII - Global Public Inclusive Infrastructure
  2. GPII-2473

Implement a GitHub and GitLab CI proxy

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      At the APCP F2F last May we discussed the possibility of moving away from Jenkins to GitLab for their CI features. The Docker container mentioned in GPII-2449 was created for a demo in 2016. In its current shape the container will listen for GitHub webhook events, mirror changes to GitLab, and post CI results back to GitHub - more details are captured in the container repository's README. This JIRA tracks some of the container's limitations and captures other notes.

      The two main limitations are lack of:

      • Queuing - when a GitHub webhook payload is received a Node script uses the payload as an argument to mirror changes to GitLab. If the GitLab API endpoints are unavailable at that time the script isn't rerun at a later date
      • Manually triggering CI jobs using PR comments

      The next iteration of this approach should accomplish what this prototype does, which is:

      • Process GitHub push or pull request events when changes are either merged in branches or when pull requests are sent via trusted contributors
      • Create a matching GitLab project if one does not already exist
      • Enable up a GitLab CI runner for the project in question
      • Enable a build events webhook that will broadcast CI job progress
      • Clone the GitHub repository and set up GitLab as a remote
      • Push updated branches to the GitLab repositories
      • Process GitLab CI job webhook payloads and publish job results using GitHub's Statuses API

      It should:

      • Queue jobs as payloads are received and retry jobs when API endpoints are not reachable
        • Multiple events for the same commit should be queued and processed sequentially (for example, if someone pushes several commits to a PR branch)
      • Listen for GitHub PR comment payloads and trigger GitLab CI jobs when approved admins use commands such as "ok to test"

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jhernandez Javier Hernández
              Reporter:
              avtar Avtar Gill
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: