GitLab CI/CD Tutorial


You’ve probably heard of GitLab’s CI/CD feature. If not, this tutorial will teach you how to set up a CI pipeline, and run your jobs using Gitlab’s CI runner. It also goes over pipeline variables, naming jobs, and setting an expiration policy.

expiration policy

When you use GitLab for continuous integration, you can specify how often your build artifacts are automatically deleted. By default, artifacts are removed every hour, but you can set an expiration date as well. After that, they are not accessible anymore. You can also specify an expiration date for report output files.

You can set the cleanup time by using the GitLab API. However, this method requires you to be logged into the server and to be able to run commands on the server. This can be very time-consuming and a lot of resources can be wasted. Hence, you may want to limit the time your cleanup jobs will take to complete.

For your own security, you should consider using the latest release of GitLab. If your development environment uses multiple containers, you should avoid storing old images. This can cause multiple jobs to fail.