Option 1: Use local system volume mounts to start the Runner container. This example uses the local system for the configuration volume that is mounted into the gitlab-runner container. This volume is used for configs and other resources. Docker run -d -name gitlab-runner -restart always -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab. When GitLab Runner is started as a system service (for example, with Systemd), the logs are in most cases logged through Syslog or other system logging mechanism. With GitLab Runner started as a Docker based service, since the gitlab-runner. Command is the main process of the container, the logs can be read using the docker logs command.
Gitlab is brilliant, the official gitlab runner is pretty robust and supports all the best new features of gitlab.
But one thing that poses as a bit of an obstacle for those of us with fairly exotic build environments is that theofficial gitlab runner is written in Go, and Go (or GCC-go) is not available on every platform.
So this project was born to fill this niche where you want to use gitlab on a system that simply can't run the officialgitlab-runner and where the ssh executor wont work. You should be able to a 'shell' executor on any system that canrun git
and supports recent python
(2.7 or 3.6+)
The runner is in active use on other projects:
- CUnit - https://gitlab.com/cunity/cunit/pipelines
- Windows Docker
- Solaris 11 on AMD64
- Linux Ubuntu 19.04 on Power9
Systems that are intended as targets are:
- Windows + Docker (until official windows docker runner is ready for use)
- Solaris 11 (patches to the official runner exist but are hard to apply)
- HP-UX on Itanium (IA64)
- AIX 6.1, 7.1 on POWER
- Linux on POWER
- x64/x86 Linux (but only for internal testing)
Supported Systems
Platform | Shell | Docker | Artifact Upload | Artifact download/dependencies |
---|---|---|---|---|
Linux (amd64) | yes | yes | yes | yes |
Linux (power) | yes | maybe | yes | yes |
Windows 10/2019 | yes | yes | yes | yes |
Solaris 11 (amd64) | yes | n/a | yes | yes |
Solaris 11 (sparc) | yes | n/a | yes | yes |
AIX 7.1 (python3) | yes | n/a | yes | yes |
AIX 7.2 (python3) | yes | n/a | yes | yes |
HPUX-11.31 (python3) | yes | n/a | yes | yes |
There really is no sensible reason to use gilab-python-runner
on x64 linux other than to test changes to the project.
Register a Runner
At the very least you need to know the gitlab server address (eg https://gitlab.com
) and the runner registration token(you get this from your runners page on your server, project or group)
Python Gitlab Ci Yaml
This should exit without an error (TODO print more useful feedback) and have created a config file.
Gitlab Ci Yaml File
This will have created a new runner on your gitlab server with the tag given above by --tag ARG
It should also haveset a meaningful description for you.
Gitlab Runner Python Example
Starting the Runner
Gitlab Runner Python Not Found
You can decide to start the runner as part of an init script, or within a screen session or maybe as the entrypoint ina docker container. You simply need to point it at the yaml file created by using --register
Gitlab Runner Python Program
Which should start to poll the server :