GitLab CI: Pipelines, CI/CD and DevOps for Beginners
https://dtn.udemy.com/course/gitlab-ci-pipelines-ci-cd-and-devops-for-beginners
If you don't have a GitLab account you can setup your own runners
GitLab runner with a docker execturor with AWS EC2 https://www.youtube.com/watch?v=HGJWMTNeYqI
GitLab runner with mac https://www.youtube.com/watch?v=G8ZONHOTAQk
course notes: https://buildmedia.readthedocs.org/media/pdf/gitlab-ci-course-notes/latest/gitlab-ci-course-notes.pdf
Create new project in gitlab and name it ray test car assemble line -> new file -> .gitlab-ci.yml
build the car:
script:
- mkdir build
- cd build
- touch car.txt
- echo "chassis" > car.txt
- echo "engine" > car.txt
- echo "wheels" > car.txt
Add a test stage
stages:
- build
- test
build the car:
stage: build
script:
- mkdir build
- cd build
- touch car.txt
- echo "chassis" > car.txt
- echo "engine" >> car.txt
- echo "wheels" >> car.txt
- pwd
- ls
artifacts:
paths:
- build/
test the car:
stage: test
script:
- pwd
- ls
- test -f build/car.txt
- cd build
- ls
- grep "chassis" car.txt
- grep "engine" car.txt
- grep "wheels" car.txt
You can download job artifacts when debugging