Gerrit

Usage: lftools gerrit [OPTIONS] COMMAND [ARGS]...

  GERRIT TOOLS.

Options:
  --help  Show this message and exit.

Commands:
  abandonchanges              Abandon all OPEN changes for a gerrit project.
  addfile                     Add an file for review to a Project.
  addgithubrights             Grant Github read for a project.
  addgitreview                Add git review to a project.
  addinfojob                  Add an INFO job for a new Project.
  create-saml-group           Create saml group based on ldap group.
  createproject               Create a project via the gerrit API.
  list-project-inherits-from  List who a project inherits from.
  list-project-permissions    List Owners of a Project.

Commands

list-project-permissions

Usage: lftools gerrit list-project-permissions [OPTIONS] GERRIT_FQDN PROJECT

  List Owners of a Project.

Options:
  --help  Show this message and exit.

list-project-inherits-from

Usage: lftools gerrit list-project-inherits-from [OPTIONS] GERRIT_FQDN
                                                 GERRIT_PROJECT

  List who a project inherits from.

Options:
  --help  Show this message and exit.

abandonchanges

Usage: lftools gerrit abandonchanges [OPTIONS] GERRIT_FQDN GERRIT_PROJECT

  Abandon all OPEN changes for a gerrit project.

  gerrit_url gerrit.o-ran-sc.org gerrit_project test/test1

Options:
  --help  Show this message and exit.

addgitreview

Usage: lftools gerrit addgitreview [OPTIONS] GERRIT_FQDN GERRIT_PROJECT

  Add git review to a project.

  Example: gerrit_url gerrit.o-ran-sc.org gerrit_project test/test1

Options:
  --issue_id TEXT  For projects that enforce an issue id for changesets
  --help           Show this message and exit.

addgithubrights

Usage: lftools gerrit addgithubrights [OPTIONS] GERRIT_FQDN GERRIT_PROJECT

  Grant Github read for a project.

  gerrit_url gerrit.o-ran-sc.org gerrit_project test/test1

Options:
  --help  Show this message and exit.

addfile

Usage: lftools gerrit addfile [OPTIONS] GERRIT_FQDN GERRIT_PROJECT FILENAME

  Add an file for review to a Project.

  Requires gerrit directory.

  Example:

  gerrit_url gerrit.o-ran-sc.org/r gerrit_project test/test1

Options:
  --issue_id TEXT       For projects that enforce an issue id for changesets
  --file_location TEXT  option allos you to specify full path and file name
  --help                Show this message and exit.

createproject

Usage: lftools gerrit createproject [OPTIONS] GERRIT_FQDN GERRIT_PROJECT
                                    LDAP_GROUP

  Create a project via the gerrit API.

  Creates a gerrit project. Sets ldap group as owner.

  Example:

  gerrit_url gerrit.o-ran-sc.org/r gerrit_project test/test1 ldap_group oran-
  gerrit-test-test1-committers

Options:
  --description TEXT  Project Description  [required]
  --check             just check if the project exists
  --help              Show this message and exit.

create-saml-group

Usage: lftools gerrit create-saml-group [OPTIONS] GERRIT_FQDN LDAP_GROUP

  Create saml group based on ldap group.

Options:
  --help  Show this message and exit.

addinfojob

Usage: lftools gerrit addinfojob [OPTIONS] GERRIT_FQDN GERRIT_PROJECT JJBREPO

  Add an INFO job for a new Project.

  Adds info verify jenkins job for project. result['id'] can be used to ammend
  a review so that multiple projects can have info jobs added in a single
  review

  Example:

  gerrit_url gerrit.o-ran-sc.org/r gerrit_project test/test1 jjbrepo ci-
  mangement

Options:
  --reviewid TEXT  ammend a review rather than making a new one
  --issue_id TEXT  For projects that enforce an issue id for changesets
  --help           Show this message and exit.

Note

Gerrit API methods require configuration in lftools.ini in a global [gerrit] section. support for [gerrit.umbrella.tld] exists as well signed_off_by required to push changes. Projects that do not allow self merge will require as project.example.org.second section for submission of their .gitreview on project creation.

[gerrit.example.org]
username = lfid
password = password
signed_off_by = Your Name <your@email.org>

[gerrit.example.org.second]
username = lfid2
password = password2
signed_off_by = Your Name <your@email.org>