Skip to content

CI Level 1

In this level the CI runner binary is executed by submitting it as a batch job to one of the HPC or FTP systems. When the batch job is started, the CI runner binary inside the job contacts the CI server instance, pulls all waiting CI jobs, executes all stages, downloads/uploads all the artifacts and then quits.

Configuring the CI runner

Use the gitlab-runner register command to register and configure your runner, or edit the ${HOME}/.gitlab-runner/config.toml file directly.

Submitting the CI runner as a batch job

There are two possibilities for submitting the runner as a batch job. Either submit it using sbatch --wrap:

$ sbatch --wrap="gitlab-runner" -t 00:30:00 --partition develop

Or create a batch script and submit the batch script using sbatch job.sh:

#!/bin/bash
#SBATCH --partition develop
#SBATCH -t 00:30:00

gitlab-runner run

Setting up regular builds

You can configure Slurm to automatically submit the CI runner batch job at repeated intervals. Use the scrontab -e command and set up the job like this:

#SCRON -p develop
#SCRON -t 00:30:00
@midnight gitlab-runner run

Last update: September 28, 2023