CI/CD Engines & Pipelines
- When developer submits code (push or PR), we need to
- download dependencies
- build the code
- run the tests
- execute scans
- show coverage reports
- Deployment ( release branches)
- Doing the above manually is difficult, we need a software where we can create the above pipeline and these softwares are called as CI/CD Engines
-
Popular CI/CD Engines
- Cruise Control
- Jenkins
- Gitlab
- Azure DevOps (*)
- Atlassian Bamboo
- Team city
- Circle CI
- Github Actions (*)
- We will discuss about azure devops and Github Actions
-
pipeline: This is workflow which will have
- trigger/events: When should this pipleine be executed
- node/agent: where the pipeline has to be executed
- what has to be done: steps
- Simple Maven pipeline in plain english
- trigger: PR on develop branch
- node/agent: some linux vm where java and maven is setup
- steps:
- clone the code (get the pr branch)
- mvn clean package
- show test results
- preserve the artifact (.jar)
-
Simple dotnet core pipeline in plain english
- trigger: PR on develop branch
- node/agent: some linux vm where dotnet sdk 9 is installed
- steps:
- clone the code (get the pr branch)
- dotnet build
- dotnet test
- dotnet publish
- preserve the artifact (.jar)
- In Both Azure DevOps and Github Actions to create pipelines we need to write YAML files
YAML
- This is a data reprsentation format.
- YAML Tutorial
- YAML design of data is name value (key value) pairs
- syntax
- key value pair syntax
<key>: <value> - YAML files are generally stored with file extensions
.ymlor.yaml
