Skip to content
Snippets Groups Projects
Commit 30168de6 authored by Furkan Ayhan's avatar Furkan Ayhan :two:
Browse files

Merge branch 'fa-ci_pipeline_processing-ss' into 'main'

Add screenshots for examples of Future of CI Pipeline Processing

See merge request !8537
parents 1a9cefa2 f33065f5
No related branches found
No related tags found
No related merge requests found
Pipeline #1451413671 passed
Showing
with 46 additions and 5 deletions
......@@ -87,11 +87,15 @@ job1:
stage: test
when: manual
allow_failure: true # default
script: exit 0
job2:
stage: deploy
script: exit 0
```
![Problem 2 Example 1](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-2-example-1.png)
Currently;
- `job1` is skipped.
......@@ -120,16 +124,28 @@ For example;
```yaml
job1:
stage: build
script: ls
when: manual
next_job1:
stage: test
script: exit 0
job2:
stage: test
script: ls
rules:
- if: $ALWAYS_TRUE
- if: $ALWAYS_TRUE != "asdsad"
when: manual
next_job2:
stage: deploy
script: exit 0
```
![Problem 2 Example 2](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-2-example-2.png)
`job1` and `job2` behave differently;
- `job1` is not a blocker because it has `allow_failure: true` by default.
......@@ -168,6 +184,8 @@ test:
needs: [build]
```
![Problem 3-1 Example 1](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-3-1-example-1.png)
- `build` is ignored (skipped) because it's `when: manual` with `allow_failure: true`.
- `test` is skipped because "ignored" is not a successful state in the DAG processing.
......@@ -185,6 +203,8 @@ test:
script: exit 0
```
![Problem 3-1 Example 2](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-3-1-example-2.png)
- `build` is ignored (skipped) because it's `when: manual` with `allow_failure: true`.
- `test2` runs and succeeds.
......@@ -208,6 +228,8 @@ rollback_job:
when: on_failure
```
![Problem 3-2 Example 1](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-3-2-example-1.png)
- `build_job` runs and fails.
- `test_job` is skipped.
- Even though `rollback_job` is `when: on_failure` and there is a failed job, it is skipped because the `needs` list has a "skipped" job.
......@@ -229,6 +251,8 @@ rollback_job:
when: on_failure
```
![Problem 3-2 Example 2](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-3-2-example-2.png)
- `build_job` runs and fails.
- `test_job` is skipped.
- `rollback_job` runs because there is a failed job before.
......@@ -253,6 +277,8 @@ test:
script: exit 0
```
![Problem 4-1 Example 1](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-4-1-example-1.png)
- `build` is in the "manual" state but considered as "skipped" (ignored) for the pipeline processing.
- `test` runs because "skipped" is a successful state.
......@@ -274,6 +300,8 @@ test:
script: exit 0
```
![Problem 4-1 Example 2](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-4-1-example-2.png)
- `build1` is in the "manual" state but considered as "skipped" (ignored) for the pipeline processing.
- `build2` runs and succeeds.
- `test` runs because "success" + "skipped" is a successful state.
......@@ -291,6 +319,8 @@ test:
script: exit 0
```
![Problem 4-2 Example 1](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-4-2-example-1.png)
- `build` is skipped because it's `when: on_failure` and its previous status is not "failed".
- `test` runs because "skipped" is a successful state.
......@@ -311,6 +341,8 @@ test:
script: exit 0
```
![Problem 4-2 Example 2](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/problem-4-2-example-2.png)
- `build1` is skipped because it's `when: on_failure` and its previous status is not "failed".
- `build2` runs and succeeds.
- `test` runs because "success" + "skipped" is a successful state.
......@@ -360,17 +392,24 @@ Let's define their differences first;
```yaml
build:
stage: build
script: sleep 10
script:
- sleep 10
- exit 1
allow_failure: true
test:
stage: test
script: exit 0
when: on_success
when: on_success # default
```
- If `build` runs and gets `canceled`, then `test` runs.
- If `build` runs and gets `failed`, then `test` runs.
If `build` runs and gets `canceled`, then `test` runs.
![Information 1 Example 1-a](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/information-1-example-1-a.png)
If `build` runs and gets `failed`, then `test` runs.
![Information 1 Example 1-b](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/information-1-example-1-b.png)
#### An idea on using `canceled` instead of `failed` for some cases
......@@ -405,6 +444,8 @@ test2:
# needs: [] would lead to the same result
```
![Information 2 Example 1](/images/handbook/engineering/architecture/design-documents/ci_pipeline_processing/information-2-example-1.png)
- `test1` runs because there is no job failed in the previous stages.
- `test2` does not run because there is no job failed in the previous stages.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment