{"id":19108834,"url":"https://github.com/balena-io-experimental/balena-gitlab-runner","last_synced_at":"2025-07-07T07:09:25.571Z","repository":{"id":48979499,"uuid":"166055620","full_name":"balena-io-experimental/balena-gitlab-runner","owner":"balena-io-experimental","description":"Gitlab Runner as a balena application","archived":false,"fork":false,"pushed_at":"2021-07-02T12:29:54.000Z","size":43,"stargazers_count":11,"open_issues_count":13,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-08-03T22:28:39.320Z","etag":null,"topics":["balena","docker","gitlab-runner"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/balena-io-experimental.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-16T14:40:11.000Z","updated_at":"2023-08-03T22:28:39.320Z","dependencies_parsed_at":"2022-08-30T08:00:56.750Z","dependency_job_id":null,"html_url":"https://github.com/balena-io-experimental/balena-gitlab-runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-gitlab-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-gitlab-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-gitlab-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/balena-io-experimental%2Fbalena-gitlab-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/balena-io-experimental","download_url":"https://codeload.github.com/balena-io-experimental/balena-gitlab-runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783464,"owners_count":17202003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["balena","docker","gitlab-runner"],"created_at":"2024-11-09T04:17:45.750Z","updated_at":"2024-11-09T04:17:46.175Z","avatar_url":"https://github.com/balena-io-experimental.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitlab-runner on balenaOS devices\n\n[GitLab runners][runners] are worker nodes to run your tests in a GitLab CI/CD\nenvironment. This project aims to help you deploy these runners on physical\nhardware on balenaOS devices.\n\nFeatures:\n\n* a `docker` executor gitlab runner\n* automatic first runner provisioning to a gitlab instance, only need to\n  provide a token\n* can add multiple runners to a single device manually\n* automatic docker image/container garbage collection using\n  [docker-gc][docker-gc] by Spotify.\n\nDiscuss this project in the [forums][forums]!\n\n## Getting Started\n\nIf using balenaCloud, follow the [getting started guide][getting started] for\nyour desired device type, to see how to register (if you haven't yet), and how\nto provision a device onto balenaCloud. Afterwards deploy this project either as\n`git push balena master` or using the [CLI][cli] with `balena push \u003cprojectname\u003e`.\n\nIf using [openbalena][openbalena], follow the guides there to provision a device,\nand run `balena push \u003cprojectname\u003e` as appropriate.\n\n## Settings\n\nThere are a number of environment variables you can customise your deployment\nwith. These help setting up your first runner automatically:\n\n* `GITLAB_TOKEN`: *required*, the runner registration token, you can get the\n  value from the **Settings** \u003e **CI/CD** \u003e **Runners** page for a particular\n  project, or from your GitLab instance's administration page.\n* `GITLAB_URL`: *optional*, the URL where the runner should connect to. The\n  default is value `https://gitlab.com/`. You can see what you need to set for\n  a particular project at the **Settings** \u003e **CI/CD** \u003e **Runners** page.\n* `GITLAB_DESCRIPTION`: *optional*, the description added to the runner on your\n  runner page. If left empty, defaults to the device's short UUID.\n* `GITLAB_DEFAULT_IMAGE`:*optional*, the default image to use in jobs, if\n  the job doesn't specify the image. If left empty it defaults to\n  `balenalib/\u003cdevicetype\u003e-debian`, with the device type automatically filled in.\n* `TAG_ARCHITECTURE`: *optional*, whether or not create the runner with tag\n  showing the architecture (as given by `uname -m`, such as `armv7l`, `x64_64`,\n  etc). Left empty defaults to `yes`, and any other value will prevent this tag\n  being added.\n* `TAG_DEVICE_TYPE`: *optional*,  whether or not create the runner with tag\n  showing the balena device type (i.e. `raspberrypi3`, `intel-nuc`, etc). Left\n  empty defaults to `yes`, and any other value will prevent this tag being added.\n* `TAG_BALENA`: *optional*, whether or not tag the runner with the `balena` tag,\n  thus showing clearly what are balena devices among your runners, if there are\n  other types as well. If left empty, defaults to `yes`, and any other value will\n  prevent this tag being added.\n* `GITLAB_TAGS`: *optional*, the list of any other tags to add (comma delimited,\n  such as `office,screen`).\n* `GITLAB_RUN_UNTAGGED`: *optional*, whether or not run untagged build jobs.\n  Left empty defaults to `yes` (do run untagged jobs), any other value make it\n  run only tagged jobs (and matching tags). You can also change this on your\n  runner configuration page.\n* `GITLAB_LOCKED`: *optional*, whether or not the runner is locked to a specific\n  project. Left empty defaults to `yes` (locked to a project), any other value\n  makes it default unlocked. You can also change this on your runner\n  configuration page.\n* `GITLAB_RUNNER_HELPER_IMAGE`: *optional*, to set a different helper image to\n  use with the runner. For more information, check the [relevant GitLab logs][runner-helper].\n  This is a registration-time setting, so changing the value won't change an already registered\n  runner For x86 32-bit runners, GitLab doesn't provide runner helper images, but we have\n  some custom builds available at `imrehg/gitlab-runner-helper:i386-${CI_RUNNER_VERSION}`\n  and that value is automatically applied for 32-bit runners (such as Intel Edison).\n  It's custom work based on a patched version of the upstream GitLab runners (see the\n  [i386 branch of our fork][gitlab-runner-fork]), thus your milage may vary.\n* `DEBUG`: *optional*, set it to any value to enable certain debug/diagnostics functionality,\n  see the code in more details. One current example is keeping all garbage collection\n  logs on the device (instead of just the last one)\n\nSee more information at the [Configuring GitLab Runners docs][config]. The\nconfiguration file is also available to edit.\n\n### Adding extra runners\n\nFor subsequent runners you will have to use the terminal to set them up. Connect\nto the `runner` service either in the web dashboard, `balena ssh $UUID` (on\nbalenaCloud) or `balena local ssh $UUID` (on openbalena), and check out\n`gitlab-runner register --help` for options.\n\n\n[cli]: https://github.com/balena-io/balena-cli \"balena CLI on GitHub\"\n[config]: https://docs.gitlab.com/ee/ci/runners/README.html \"Configuring GitLab Runners\"\n[docker-gc]: https://github.com/spotify/docker-gc/ \"docker-gc on GitHub\"\n[forums]: https://forums.balena.io/t/gitlab-runner-on-balena-devices-for-continuous-integration-testing/5090\n[getting started]: https://www.balena.io/docs/learn/getting-started/raspberrypi3/go/ \"Raspberry Pi 3 - golang getting started\"\n[gitlab-runner-fork]: https://gitlab.com/imrehg/gitlab-runner/tree/i386 \"GitLab Runners repo fork with i386 modifications\"\n[openbalena]: https://www.balena.io/open/ \"openbalena home page\"\n[runners]: https://docs.gitlab.com/runner/ \"GitLab Runner\"\n[runner-helper]: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#helper-image \"Advanced configuration: Helper image\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalena-io-experimental%2Fbalena-gitlab-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbalena-io-experimental%2Fbalena-gitlab-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbalena-io-experimental%2Fbalena-gitlab-runner/lists"}