GitLab Configuration File
The GitLab CI/CD configurations are defined in the root repository in a file called “.gitlab-ci.yml”. In the file, you can define the scripts to be run, dependencies, commands to run in order, and other configuration files and templates to be included.
A
.gitlab-ci.yml file might contain:
stages:
- build
- test
build-code-job:
stage: build
script:
- echo "Check the ruby version, then build some Ruby project files:"
- ruby -v
- rake
test-code-job1:
stage: test
script:
- echo "If the files are built successfully, test some files with one command:"
- rake test1
test-code-job2:
stage: test
script:
- echo "If the files are built successfully, test other files with a different command:"
- rake test2