In this tutorial, we will cover the step-by-step process of installing GitLab CI on NetBSD.
Before we begin, make sure you have the following prerequisites:
SSH into your NetBSD server as root.
Install GitLab CI by running the following command:
# pkg_add gitlab-runner
It will install GitLab CI Runner on your NetBSD server.
Navigate to your GitLab instance and create a new project.
Click on the "Settings" cog in the top right corner and select "CI/CD".
Under "Runners", click "Set up a specific Runner manually".
Copy the URL and registration token.
SSH back into your NetBSD server and run the following command to register your runner:
$ gitlab-runner register
Follow the prompts and paste the URL and registration token when prompted.
Choose a descriptive name for your runner and select the tags associated with it.
Once registered, the runner will be ready to use.
$ vi /usr/pkg/etc/gitlab-runner/config.toml
concurrent = 1
check_interval = 0
[[runners]]
name = "netbsd-runner"
url = "https://gitlab.example.com/"
token = "xxxxxxxxxxxxxxxxxxxxx"
executor = "docker"
environment = ["DOCKER_TLS_CERTDIR=", "DOCKER_CERT_PATH="]
[runners.docker]
tls_verify = false
image = "docker:stable"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]
extra_hosts = ["gitlab.example.com:192.168.1.1"]
shm_size = 0
Note: Replace the name
, url
, and token
values with your GitLab instance details.
.gitlab-ci.yml
file with the following contents:stages:
- test
test:
stage: test
script:
- echo "Hello, NetBSD!"
Commit the file to the project's master branch.
Navigate back to your NetBSD server and start the GitLab Runner by running the following command:
$ gitlab-runner start
Verify the runner successfully picks up the job by checking the GitLab CI/CD pipeline.
The pipeline should be successful and display the output Hello, NetBSD!
.
Congratulations! You have successfully installed GitLab CI on NetBSD and used it to run a basic pipeline.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!