1.Install gitlab runner on centos7
wget https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_amd64.rpm
rpm -ivh gitlab-runner_amd64.rpm
systemctl status gitlab-runner
More : https://docs.gitlab.com/runner/install/
2.Get Gitlab URL and token for runner
https://gitlab.com/<username>/<project_name> > setting > CI / CD > Runners
Note: This token has been revoked. you will have different token
3.Register Runner with gitlab-runner register
command as below
4.Create .gitlab-ci.yml
in your gitproject root directory
stage1:
tags:
- ci
script:
- echo stage 1
stage2:
tags:
- ci
script:
- echo stage 2
tags: it’s should be same as we used in runner registration