Making our CI/CD Pipeline
Config File
To create our pipeline, we must first create a .gitlab-ci.yml
file and specify it to our project requirements (Place this in your project root)
Paste the code then push it to your repository
We can now view our pipeline from the repository, under Build -> Pipeline -> Pipeline Number
Viewing our deployed pipeline
Issues Faced
Spent the better part of an hour debugging and figured out that you need to create a runner as root cause of docker permissions. Alternatively, you can add yourself to the docker group - although it's easier just to use sudo
Testing for Failures
Just like in Simple Calculator Project, we can test for failures by changing the values slightly
First, we'll create a separate branch to mimic a real project, then change the test values from there
Push your changes then wait for the pipeline to finish running
We can now fix it back and create a merge request to main. Merge requests will trigger a pipeline job to check for errors before letting you merge (depending on your project settings)
Last updated