Run jobs with Shared Runners
Overview
Shared runners are used to execute jobs on GitLab CI/CD pipelines. They are managed by GitLab and can be used by multiple projects, making it easy to run jobs without setting up dedicated infrastructure.
For more information, please see Manage runners.
Pre-requisites
Modify the pipeline
Select the project and click the .gitlab-ci.yml
> Edit > Edit in Pipeline Editor. Paste the code below:
windows_job:
tags:
- shared_windows
script:
- echo "Windows OS Version"
- systeminfo
linux_job:
tags:
- saas-linux-medium-amd64
script:
- echo "Linux OS Version"
- cat /etc/os-release
macos_job:
tags:
- saas-macos-medium-m1
script:
- echo "Mac OS Version"
- system_profiler SPSoftwareDataType
The tags specify the type of runners that will be used for this pipeline. Tags can be used for different use cases but for this example, we'll use it to specify the runner type. Click Commit changes.
The new pipeline should now show "running" in the Pipelines page.
Click the job number to show the status of the three jobs. We can see that the macos_job
failed.
If you click the failed job, you can see the exact error why it failed.
Based on Hosted runners on macOS, MacOS runners are only available to premium users. Since we're only using the free trial account, we are not able to use MacOS runners.