tarides / tezos-ci

OCurrent CI for Tezos
https://tezos.ci.dev
3 stars 7 forks source link

Add cli tool to create GitLab application and permissions #21

Open tmcgilchrist opened 2 years ago

tmcgilchrist commented 2 years ago

Background

GitLab is missing the integrated concept of an [GitHub Application]() that includes allowing access to a project/group, setup notifications of merge request/push events, and notifications of adding new projects to build. We would like a cli application that creates/maintains the correct set of web hooks and permissions.

Summary

  1. Create the necessary token / application and project web hooks for tezos-ci. Given an existing token with permissions to create or update setup everything required for a tezos-ci instance.
  2. Add signup process for adding new project to build and creating the right webhook callbacks, based off an existing access token with sufficient permissions.

The GitLab Application should have

The web hooks are setup per project, so for each project it needs:

Outcome

A cli application to

The CLI should look something like:

tezos-setup create --token <token>
tezos-setup add --project-id <project_id> | --project_name tezos/tezos --token <token>
tezos-setup add --projects "tezos/tezos, tmcgilchrist/ocaml-gitlab" --token <token>
novemberkilo commented 2 years ago

Also see https://github.com/tarides/tezos-ci/blob/main/doc/gitlab.md