Merge Request

Note: Premium video content requires a subscription.

Let’s take a look at Merge Request workflow. Here’s the YAML.


image: ruby:latest

# ...
  - plan dev
# ...

# Runs on Merge Request Only
  stage: plan dev
  - merge_requests
    - terraspace plan demo
# ...

The difference here is that this will create a GitLab pipeline that only runs on merge_request events and will run a terraspace plan.

Create Branch and MR

git checkout feature1
vim app/stacks/demo/
git add .
git commit -m "change code"
git push -u origin feature1

To create a Merge Request, you can either go to the url printed out from git push

Or go to the branch on GitLab and click “Create Merge Request” on the newly pushed branch.

The build should start shortly.

You can see the step by clicking on it.

Logging Details

Click on Details to see the Pipeline Logging output.

A plan was run and provides a preview of what would happen. Any additional git push to the MR branch will provide updated previews.

Merge Request Comment

Also, a MR comment with a Terraspace cloud link was added.

If you merge the MR, the Push Pipeline that we covered earlier will automatically apply the preview.

Next, we’ll cover the Manual Web Pipeline.

More tools: