# Pipeline

## CD - continuous deployment

## CI - continuous integration

* First step on pipeline
* On git push, the build is run on a build agent, this allows the app to have a source of truth and place to start from to deploy a working app
* Run all tests
  * Unit
  * acceptance/documentation
  * Integration
  * End to end
  * Tests that dont run locally
    * mutation or long running static analysis tests
    * pacts/consumer contracts
* Creates the binary, ie the jar
* Create the docker image
* Places the binary or image on a Repository

## continuous delivery

## Seperating CI/CD

* PArt of 12 factor app
* The build (CI) creates the binary
* Another pipeline deploys the binary, and is versioned differently
* Should not need to build a new binary to release a new version
  * especially for config changes
* <https://12factor.net/build-release-run>

## Build Monitor

* A scrreen which displays the all the CI builds, and give visual feed back to what build is failing (coloured red).
* It should be updated constently and not be out of date
* Instant feedback means devs who pushed code that broke build must fix it as a priority, before anyone works on it.
* Should be in a place visible to all the team
* Can have reminders, calendars on it too

## Gocd

* Creating pipelines
* pipelines that pull from git (master or branch)
* manual gates
* materials
* tasks
* jobs
* artifacts
* logs
* Quality gates
  * check status pages

## Teamcity

## Example

<https://www.edureka.co/blog/ci-cd-pipeline/>

### Jenkins

* <https://www.edureka.co/blog/install-jenkins/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hanfak.gitbook.io/workspace/devops1/ci-cd/pipeline.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
