New CI
We’ll use terraspace new ci to generate a starter CI folder structure.
terraspace new ci
Here’s an example with output.
$ terraspace new ci
create .gitlab-ci.yml
A .gitlab-ci.yml
was created.
GitLab Pipelines
With GitLab, we can use the same file to create different pipelines.
- Push Workflow: Runs when you push a new commit to a branch. This is the default pipeline type. GitLab calls it a “Branch pipeline”.
- Merge Request: Runs when you creates a new merge request from a source branch with one or more commits. This is like a GitHub Pull Request.
- Manual Web pipeline: Runs manually via the web console.
All pipelines are defined with in the same .gitlab-ci.yml
file. Keep this in mind as we review the pipelines. Next, we’ll review .gitlab-ci.yml
.