All Projects → RedHatQE → ocp-gitlab-runner

RedHatQE / ocp-gitlab-runner

Licence: Apache-2.0 license
OpenShift template for GitLab Runner with Kubernetes executor

Programming Languages

Dockerfile
14818 projects

Projects that are alternatives of or similar to ocp-gitlab-runner

gitlab-ci-android-fastlane
Docker image for building android apps on Gitlab CI
Stars: ✭ 25 (-10.71%)
Mutual labels:  gitlab-runner
gitlab-ci-runner-marathon
A customized Docker image for running scalable GitLab CI runners on Marathon
Stars: ✭ 14 (-50%)
Mutual labels:  gitlab-runner
aws-autoscaling-gitlab-runner
CloudFormation template to deploy a GitLab Runner with auto-scaling on AWS.
Stars: ✭ 44 (+57.14%)
Mutual labels:  gitlab-runner
gitlabby-dockerish-laravel
What happens when you Dockerize your Laravel testing environment and throw it at Gitlab CI?
Stars: ✭ 33 (+17.86%)
Mutual labels:  gitlab-runner
gitlabci-ue4
No description or website provided.
Stars: ✭ 32 (+14.29%)
Mutual labels:  gitlab-runner
podman-gitlab-runner
Use Podman as a custom executor for your Gitlab CI
Stars: ✭ 87 (+210.71%)
Mutual labels:  gitlab-runner
gitlab-runner
Gitlab Runner on Alpine Linux [Docker]
Stars: ✭ 17 (-39.29%)
Mutual labels:  gitlab-runner
gitlab-sonar-scanner
This project is no longer maintained
Stars: ✭ 80 (+185.71%)
Mutual labels:  gitlab-runner
docker-kafka
Simple Kafka Container with embedded ZooKeeper
Stars: ✭ 13 (-53.57%)
Mutual labels:  gitlab-runner
gitlab-runner
GitLab Runner (Docker image) for ARM devices, this is a mirror repository of
Stars: ✭ 17 (-39.29%)
Mutual labels:  gitlab-runner
autoscaling-ec2-gitlab-runners-fargate
Autoscaling EC2 GitLab Runners Spawned by Fargate
Stars: ✭ 20 (-28.57%)
Mutual labels:  gitlab-runner
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (+110.71%)
Mutual labels:  gitlab-runner

Intention

Gitlab proposes to deploy the runner using Helm or GitLab operator. It requires additional permissions. This approach problematically to use in OpenShift Container Platform if you don't have cluster admin privileges. Moreover, default images are not designed to run using an arbitrarily assigned user ID. This repo contains dockerfiles and an OpenShift template which allows you to deploy the GitLab runner in OCP with minimum efforts.

Usage

Add and instantiate the template. You should replace GITLAB_RUNNER_VERSION by required version of gitlab-runner, e.g. v13.8.0. It's not guaranteed that version from master will work due to changes in https://gitlab.com/gitlab-org/gitlab-runner repo. You can also specify latest in GITLAB_RUNNER_VERSION to provision the latest stable version of the template.

oc process -f https://raw.githubusercontent.com/RedHatQE/ocp-gitlab-runner/GITLAB_RUNNER_VERSION/ocp-gitlab-runner-template.yaml \
-p NAME="some_name" \
-p GITLAB_HOST="example.com" \
-p REGISTRATION_TOKEN="$(echo -n some_token | base64)" \
-p CONCURRENT="number_of_concurrent_pods" | oc create -f -

In order to delete all created objects:

oc delete secret,cm,sa,rolebindings,bc,is,deployment -l app=some_name

Contents

runner.Dockerfile

This image based on registry.access.redhat.com/ubi8-micro. It contains gitlab-runner executable that talks to GitLab CI and spawns builder pods via kubernetes executor.

helper.Dockerfile

GitLab's helper image with gitlab-runner-helper executable. The image based on registry.access.redhat.com/ubi8-minimal.

ocp-gitlab-runner-template.yaml

An OpenShift template that creates required objects and deploys the runner with minimum efforts. Just provide a name, GitLab instance host, runner's registration token and desired number of concurrent build pods.

Parameters

  • NAME

    description: Name of DeploymentConfig and value of "app" label.

    required: true

  • GITLAB_HOST

    description: Host of a GitLab instance.

    required: true

  • GITLAB_RUNNER_VERSION

    description: GitLab runner version, e.g "v13.1.2".

    required: false

  • REGISTRATION_TOKEN

    description: Runner's registration token. Base64 encoded string is expected.

    required: true

  • CONCURRENT

    description: The maximum number of concurrent CI pods.

    required: true

  • RUNNER_TAG_LIST

    description: Tag list.

    required: false

  • GITLAB_BUILDER_IMAGE

    description: A default image which will be used in GitLab CI.

    required: false

  • TLS_CA_CERT

    description: A certificate that is used to verify TLS peers when connecting to the GitLab server. Base64 encoded string is expected.

    required: false

  • TEMPLATE_CONFIG_FILE

    description: A patch for config.toml which will be applied during runner registration. Details in https://docs.gitlab.com/runner/register/#runners-configuration-template-file

    required: false

  • TEMPLATE_REPO

    description: A repo url with this template. It might be useful for development puproses.

    required: false

  • TEMPLATE_REF

    description: A ref of the repo with this template. It might be useful for development puproses.

    required: false

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].