This can be used to setup a GitLab Runner.
GitLab Runner - https://docs.gitlab.com/runner/
- This configuration is only applicable for setting a Runner in Container. For all types of Runner setup please check Runner Install.
- Some modification must be applied before starting the setup.
- A default configuration file provided here is as a template.
Following modifications are required.- GITLAB_RUNNER_NAME - gitlab-runner
- GITLAB_SERVER_URL - https://gitlab.mydomain.com
- GITLAB_RUNNER_TOKEN - GITLAB_RUNNER_TOKEN
- Shared Runner
- Group Runner
- Project Runner
https://docs.gitlab.com/ee/ci/runners/runners_scope.html
- Create a Shared Runner from Admin Area of GitLab Instance.
During the creation provide the necessary tags and/or also use runner to be used as an untagged if needed.
More information can be found here. - Note down the Runner Token that we will replace it in the
configs/config.toml
file.
docker-compose up -d
docker-compose logs -f
The above process will also register the runner as we have provided all the info in the configuration file.
If we do not provide the config.toml
file then following is the step to register the runner after starting the container.
More information can be found here.
docker-compose exec gitlab-runner gitlab-runner register