>_ IzzyLab

Hands-on task

This task is step 8 of the course “Platform intro”

GitLab: your first pipeline

easy~10 min

A pipeline is a set of commands GitLab runs by itself after every push. The project /root/app has a script hello.sh; let's run it in CI.

Create a file .gitlab-ci.yml in the project root with exactly this content:

hello:
  script:
    - ./hello.sh

Commit it, run git push and open the project in GitLab (the details are on the GitLab tab): a pipeline will appear under Build → Pipelines. Wait for the green check mark and look at the log of the hello job.

What you'll practise:
  • GitLab CI
  • pipeline
  • git push

Topic breakdown

.gitlab-ci.yml describes the pipeline: each job is a name and a script with a list of commands. A green check mark means every command succeeded; a red cross means one of them failed, and the reason is in the job's log.

What's checked

  1. The pipeline on main is green
  2. The hello job passed

What it looks like