This is useful for local dev testing of gitlab-ci.yml
.
See Install GitLab Runner for platform specific GitLab runner installation.
$ brew install gitlab-runner
C:\GitLab-Runner
.gitlab-runner.exe
(optional). You can download a binary for every available version as described in download any other tagged release.Write
permissions on the GitLab Runner directory and executable. If you do not set these permissions, regular users can replace the executable with their own and run arbitrary code with elevated privileges.To download the appropriate package for your system:
For Debian or Ubuntu:
$ curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_${arch}.deb"
For CentOS or Red Hat Enterprise Linux:
$ curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_${arch}.rpm"
Install the package for your system as follows.
For Debian or Ubuntu:
dpkg -i gitlab-runner_<arch>.deb
For CentOS or Red Hat Enterprise Linux:
rpm -i gitlab-runner_<arch>.rpm
Registering a runner is the process that binds the runner with one or more GitLab instances.
See Registering runners for details on platform specific register commands.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
https://gitlab.com/
Get the token: Visit your repository fork in GitLab, navigate to Settings -> CI / CD -> Runners
, Copy the registration token in the Specific runners
section.
Please enter the gitlab-ci token for this runner:
<registration token>
Please enter the gitlab-ci description for this runner:
my-runner-local
Please enter the gitlab-ci tags for this runner (comma separated):
apiopenstudio-runner
Enter optional maintenance note for the runner:
<leave this empty>
Please enter the executor: docker+machine, kubernetes, custom, docker-ssh, parallels, shell, ssh, virtualbox, docker, docker-ssh+machine:
docker
Enter the default Docker image (for example, ruby:2.7):
apiopenstudio-nginx-php-8.0
The runner will now appear in GitLab: Settings -> CI / CD -> Runners, in the
section Available specific runners
.