Gitlab CI YAML Example
This is a basic example of a Gitlab CI configuration file (.gitlab-ci.yml
). It defines a single job that simply echoes "test". This is a starting point for more complex pipelines.
Example YAML Configuration
default:
tags:
- shell-runner
stages:
- test
test_job:
stage: test
script:
- echo "test"
Explanation
default
This section sets default settings for all jobs in the pipeline. Here, we specify that jobs should run on a runner with the tag shell-runner
.
stages
This defines the stages of the pipeline. In this case, we only have one stage: test
.
test_job
This defines a job named test_job
. It belongs to the test
stage and executes the script echo "test"
.
To learn more about Gitlab CI, refer to the official documentation: Gitlab CI Documentation