Let’s take a look at Pull Request pipeline.
image: ruby:latest pipelines: # ... pull-requests: '**': # this runs as default for any branch not elsewhere defined - step: script: - .bitbucket/bin/install - .bitbucket/bin/terraspace plan demo
The difference here is that this will create a GitLab pipeline that only runs on
pull_request events and will run a
Create Branch and PR
git checkout feature1 vim app/stacks/demo/main.tf git add . git commit -m "change code" git push -u origin feature1
To create a Pull Request, you can either go to the url printed out from
Or go to the branch on GitLab and click “Create Merge Request” on the newly pushed branch.
Fill out the form if you wish and click “Create pull request”
The build should start shortly.
Click on Details to see the Pipeline Logging output.
plan was run and provided a preview of what would happen. Any additional
git push to the PR branch will provide updated previews.
If you merge the PR, the Push Pipeline that we covered earlier will automatically apply the preview.
Note: Bitbucket CI integration does not support creating a PR comment yet. Pull Requests with improvements are welcomed.
Next, we’ll cover the Manual Custom Pipeline.