Gitlab Runner Python

GitLab Runner can also run inside a Docker container or be deployed into a Kubernetes cluster. View some best practices for how to use and administer GitLab Runner. GitLab Runner versions. For compatibility reasons, the GitLab Runner major.minor version should stay in sync with the GitLab major and minor version. Older runners may still work.

  1. Gitlab Runner Source Code
  2. Gitlab Runner Python Script
  3. Gitlab Runner Python Online
Latest version

Released:

Unofficial implementation of the GitLab runner client for making customised CI runners

Gitlab Runner Python

Project description

An unofficial Python implementation of the API for creating customised GitLab CI runners.

Java, PHP, Go, Python or even LaTeX, no limit here! In this blog post we review a few examples for the Python programming language. In GitLab, the different tests are called jobs. These jobs are executed by a gitlab-runner, that can be installed on the same server as you main GitLab. Clone with HTTPS. Open in your IDE. Visual Studio Code (SSH) Visual Studio Code (HTTPS) Copy HTTPS clone URL. Copy SSH clone URL git@gitlab.com:cunity/gitlab-python-runner.git. Copy HTTPS clone URL README.

This package provides the basic functionality for registering a Runner.This object can then be used to request a Job and communicate the log, status and artifacts back to GitLab.No functionality is provided to execute the payloads defined in the .gitlab-ci.yml.

This package was originally developed to support LHCb’s Analysis Productions by providing a CI runner that could submit jobs to LHCbDIRAC.More details can be found in TODO.

Registering a Runner

The simplest way to register a new Runner is with the included command line tool:

For example

where arguments can be found by navigating to the “CI/CD” page of the desired repository’s settings.

Getting jobs

After a runner has been registered it can be loaded from the .json file and used to request jobs:

Executing jobs

A minimal CI executor might run as follows:

Gitlab Runner PythonSetting up gitlab runner

See the reference Job documentation for the full list of available properties.

Persisting jobs

For long running jobs it may be desirable to persist the job object between calls.This can be done using a similar interface to the pickle module in the Python standard library:

Note: The job log is included in the persisted data therefore the Job object cannot be persisted once and loaded multiple times without loosing the log messages.

Release historyRelease notifications | RSS feed

1.0.4

1.0.3

0.9.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Gitlab Runner Source Code

Files for gitlab-runner-api, version 1.0.4
Filename, sizeFile typePython versionUpload dateHashes
Filename, size gitlab_runner_api-1.0.4-py2.py3-none-any.whl (25.0 kB) File type Wheel Python version py2.py3 Upload dateHashes
Filename, size gitlab_runner_api-1.0.4.tar.gz (32.7 kB) File type Source Python version None Upload dateHashes
GitlabClose

Hashes for gitlab_runner_api-1.0.4-py2.py3-none-any.whl

Hashes for gitlab_runner_api-1.0.4-py2.py3-none-any.whl
AlgorithmHash digest
SHA256ff75afd25259eb7370fe2bd1829aab7102209dd0999397e6cabae98f3d9dd9d9
MD5718326663de61ebd1129a30b1f1bd060
BLAKE2-25653490a7bcfd6dfde629be9e4d64cd6d7d97ec1887ac83a73450b4adf4963a0ac
Close

Gitlab Runner Python Script

Hashes for gitlab_runner_api-1.0.4.tar.gz

Gitlab Runner Python Online

Hashes for gitlab_runner_api-1.0.4.tar.gz
AlgorithmHash digest
SHA256e4f82b4cde11c98908e3c88f89f1e7a2527c283ff49a1ec2b1b833c5fbf4b757
MD57665417a707781ebf7988a508e560264
BLAKE2-25602bb9fb548be96845e434ae6dbfd11787ecc4da9c5c8b9e4d40b8814bb734fd5