Building a GitLab Runner
- Acquire a certificate that can be used by GitLab Runner. Needs to be a cert that can be registered in CONS3RT as a user. Follow this link for steps on creating a bot user with a machine certificate
- Create user in Arcus with the certificate
- Give user associated with the certificate the appropriate permissions in GitLab to register a Runner
- Go into GitLab and copy the GitLab Runner registration token
- Download the GitLab Runner - Certificate - Template
- Import asset using this article: Importing Your Asset Zip File
- Edit asset name and upload pem cert into media directory: Updating Software Assets
- Clone the GitLab Runner system (KB: Cloning Systems Scenarios and Deployments)
- Update system by swapping the certificate asset you created with the certificate asset template that you had in step 5
- Create a scenario and a deployment
- In the deployment, include the following deployment properties:
- GITLAB_VERSION - The version of GitLab to use. Required
Example:GITLAB_VERSION='premium'
- RUNNER_NAME_X - The name of the runner. X is the runner number starting at 1. Required
Example:RUNNER_NAME_1='My Project'
- RUNNER_TOKEN_X - The token for the runner. X is the runner number starting at 1. Required
Example:RUNNER_TOKEN_1='asdf1234asdf1234asdf1234'
- The runner token you acquired is here
- GITLAB_VERSION - The version of GitLab to use. Required
- Launch system by following this article: Launching a Deployment
When the run goes to reserved, you should see the Runner registered successfully in GitLab.
If you need help building a pipeline, here are a number of examples from the GitLab Docs.