This is an old revision of the document!
CI/CD with GitLab
- create a
.gitlab-ci.yml
- I usually do this via web interface. An example is included below brew install gitlab-runner
install gitlab runner - can usually be done via package manager on systemgitlab-runner register
register gitlab-runnerhttps://gitlab.com
enter the url for gitlab repo. If not self hosting it will just be gitlab.com<Token>
enter the token for repo. Found under Settings > CI/CD > Runners > Set up Specific Runner ManuallyDescription of project
tagone,tagtwo
more on this to come later
gitlab-runner start
gitlab-runner status
- if status does not show running, need to troubleshoot. On Mac check logs via
syslog
- Now when you make commits that match the given tags or branches the commands in .gitlab-ci.yml will run
- Notes
- Without configuring the runner it will create a
build
directory in project root so ensure that is added to .gitignore