Trigger the Pipeline¶
Our pipeline will only trigger when we
git push changes to
*.go files. Let's give this a try.
We don't want to change any code at this point in time, especially given we don't have any tests yet, but we can make the same change to our application as we did the Terraform: add a simple comment and then remove it again.
- Open up the
main.gofile for editing
- At the top simply add a comment:
// testing pipeline
- Now use
git commit -m 'triggering pipeline' main.goto add the changes to the repository
git pushto send the changes to the GitLab repository (the remote)
Now we'll see under
CI/CD -> Pipelines in the GitLab UI that the pipeline has executed because it's seen a change to a
- Undo the change we just made to the
main.gofile and push them to the remote repository
Now that we're built our infrastructure and application package, we can build and run our Ansible pipeline to push the application to the AWS infrastructure and make it go live.