Universum modes

Along with default mode Universum provides the following useful additional commands:

Initialize Universum

If you have Universum installed via pip3.7 install -U universum or downloaded it from GitHub and changed working directory to project root, run python3.7 -m universum init to create an example configuration file, that can be updated according to your project needs later.

Running this command will not only create a configuration file, but will also provide you with a command line to execute it with Universum.

Run Universum locally (Non-CI mode)

The python3.7 -m universum run subcommand uses provided Universum config to execute the set up scenario locally. This allows to easily perform all required checks before submitting a change to VCS. This mode can generally be used as a wrapper for a complex build system.

Universum in non-CI mode has the following differences from default mode:

  • It does not require most of build parameters - especially the VCS-related ones.
  • It does not report build results to any code review system.
  • It works with sources ‘in place’, without copying.
  • It automatically cleans the artifact folder before the build.

Poll chosen VCS for updates

This mode was created for CI systems that do not have polling feature at all or that are not able to check each change individually.

When launched in poller mode, Universum uses a simple database to remember latest checked commit for every passed VCS source, such as Git or P4 branch. On next launches it consults that database and calculates a list of updates (commits, submits) in that VCS source since last change saved in DB. After that, using an URL defined in parameters, it triggers a build in CI system for each of those changes (instead of testing only the current VCS state).

This mode allows to locate a source of behaviour changes more precisely.

Note

Even being a poller, Universum in this mode does not launch automatically. Please use some outer means (such as cron or any other time-based auto-launcher) for periodical checks.

Here are the parameters for poller mode:

Detect changes and submit them automatically

Unlike default mode, Universum in submit mode requires an already prepared local repository. For example:

  • In case of Git:

    • the repo should be already cloned
    • the required branch should be already checked out
  • In case of P4:

    • the client should be already created
    • the directory should be already synced
    • all the required shelves should be applied

After doing that, any additional changes done to source code (made manually or by script execution) will be detected by Universum submitter and added to VCS with specified description on behalf of specified user.

Here are the parameters for submitter mode:

GitHub Handler

GitHub Handler is a Universum mode that serves as GitHub Application, helping to perform and report checks on new commits to a repository. It can create new check runs on GitHub and trigger an already set up automation server to perform these checks. GitHub Handler parses all required params and passes them to the triggered builds.

For GitHub Handler to work, these parameters are mandatory:

  • --payload
  • --event
  • --trigger-url
  • --github-app-id
  • --github-private-key

These and other parameters are described below.