Available resources models

Containers / Resources mapping

  • Model type: git can only be defined in container: repos
  • Model type: acl can only be defined in container: acls
  • Model type: project can only be defined in container: projects
  • Model type: group can only be defined in container: groups

Resources

Note that the key name for every resource type is not mandatory. A resource is referenced via its resource’s ID that will automatically become the resource name value. The resource’s ID must validate the name value constraint of the related resource type. If you still want to specify the name then please make sure to have the resource ID equals to the resource name.

project

The project resource can be is used to describe a project. It can be seen as the top level resource type in in this model. You can use it reference multiple Git repositories and multiple link to external resources like a project website and the issues tracker website.

Below are the list of keys available for this resource.

website

  • Description: The project web page link
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”

mailing-lists

  • Description: Email addresses of project mailing lists
  • Type: <type ‘list’>
  • Authorized value: RE(.+@.+)
  • Mandatory key: False
  • Mutable key: True
  • Default value: []

issue-tracker-url

  • Description: The project issue tracker link
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”

source-repositories

  • Description: Code source repositories related to the project
  • Type: <type ‘list’>
  • Authorized value: RE(.+)
  • Mandatory key: True
  • Mutable key: True

name (Overwritten by the resource ID)

  • Description: The project name
  • Authorized value: RE(^([a-zA-Z0-9-_./])+$)
  • Mandatory key: False

review-dashboard

  • Description: A gerrit dashboard name reference
  • Type: <type ‘str’>
  • Authorized value: RE(^([a-zA-Z0-9-_])*$)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”

documentation

  • Description: The project documentation link
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”

contacts

  • Description: Email addresses of project main contacts
  • Type: <type ‘list’>
  • Authorized value: RE(.+@.+)
  • Mandatory key: False
  • Mutable key: True
  • Default value: []

issue-tracker

  • Description: The local issue tracker activated for this project
  • Type: <type ‘str’>
  • Authorized value: RE(^(SFStoryboard|)$)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”

description

  • Description: The project description
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: True
  • Mutable key: True

acl

The acl resource is used to store a Gerrit ACL. The acl can be shared between multiple git repositories. Group mentionned inside the acl file key must be referenced by their ID under the groups key. Do not provide the description entry in the acl file to keep them shareable between git repositories if needed.

Below are the list of keys available for this resource.

groups

  • Description: The list of groups this ACL depends on
  • Type: <type ‘list’>
  • Authorized value: RE(.+)
  • Mandatory key: False
  • Mutable key: True
  • Default value: []

name (Overwritten by the resource ID)

  • Description: The ACL name
  • Authorized value: RE(.*)
  • Mandatory key: False

file

  • Description: The Gerrit ACL content
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: True
  • Mutable key: True

git

The git resource is used to describe a git repository hosted on Gerrit. An acl ID can be provided via the acl key.

Below are the list of keys available for this resource.

acl

  • Description: The ACLs id
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”

branches

  • Description: Repository branches. Branches name is the key and branch is the branch value (a SHA/or an existing branch name/or HEAD). When branch already exist then no reset to the given value is done except for the ‘0’ value that ensure the branch does not exist by removing the ref. If you intend to explicitly declare already existing branches then please use HEAD as value.
  • Type: <type ‘dict’>
  • Authorized value: RE((‘[a-zA-Z0-9-_./]+’, ‘[a-zA-Z0-9-_./]+’))
  • Mandatory key: False
  • Mutable key: True
  • Default value: {}

name (Overwritten by the resource ID)

  • Description: The repository name
  • Authorized value: RE(^([a-zA-Z0-9-_./])+$)
  • Mandatory key: False

default-branch

  • Description: The repository default branch. If the branch does not exist yet or have not been defined in the ‘branches’ attribute then default-branch is first created from origin/HEAD
  • Type: <type ‘str’>
  • Authorized value: RE([a-zA-Z0-9-_./]*)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”

description

  • Description: The repository description
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: False
  • Mutable key: True
  • Default value: No description provided

group

The group resource is used to define a group of known user on the platform. Users must be referenced by their email address. A group can be share between multiple acls.

Below are the list of keys available for this resource.

name (Overwritten by the resource ID)

  • Description: The group name
  • Authorized value: RE(^([a-zA-Z0-9-_./])+$)
  • Mandatory key: False

members

  • Description: The group members list
  • Type: <type ‘list’>
  • Authorized value: RE(.+@.+)
  • Mandatory key: False
  • Mutable key: True
  • Default value: []

description

  • Description: The group description
  • Type: <type ‘str’>
  • Authorized value: RE(.*)
  • Mandatory key: False
  • Mutable key: True
  • Default value: “”