From 9614563a4269baf5f6d0d8d749ac90d9daf1d0c6 Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Aug 02 2021 11:56:45 +0000 Subject: Adding simple doc and link to pagure wrapper for project creation through api Signed-off-by: Fabian Arrotin --- diff --git a/docs/buildsys/git.md b/docs/buildsys/git.md index 4100d05..50600c6 100644 --- a/docs/buildsys/git.md +++ b/docs/buildsys/git.md @@ -44,3 +44,18 @@ People can also push to the [`lookaside cache`](https://git.centos.org/sources) Same logic as above : specific priviledged Red Hat account can push all needed tarballs/archives to the lookaside cache in all directories. A SIG member can push to specific branch that correspond to the logic described above for git : from our previous example, that means pushing to `c8-sig-cloud-` + +## Creating projects in RPMS namespace + +Normally Red Hat will create automatically (through pagure API calls) some projects in the /rpms/ namespace and so (see above) SIGs can then push to these projects. + +But sometimes, SIGs want new project[s] under the /rpms/ namespace, if they don't exist (yet) on git.centos.org. + +To create a new project, you'll need to call pagure API through a [simple and interactive](https://github.com/CentOS/infra-scripts/blob/master/pagure/pagure-create-repo) or [batch](https://github.com/CentOS/infra-scripts/blob/master/pagure/pagure-batch-create-repo) script and you'll also need to create config file with the pagure API token for the `centosrcm` user. (you can always retrieve that api key through `pagure-admin admin-token list` on the pagure host) + +Assuming that we are given a [list](https://pagure.io/centos-infra/issue/393), we can create a simple file and create projects like this : + +``` +cat kmod-list |while read project ; do pagure-batch-create-repo $project "the $project repo" rpms prod;done + +```