1
00:00:04,710 --> 00:00:10,080
A common concern is regarding the order of the stages and the order of the jobs, which job should be

2
00:00:10,080 --> 00:00:13,280
executed in parallel, which should be executed one after the other.

3
00:00:14,500 --> 00:00:16,420
To be honest, this is totally up to you.

4
00:00:16,450 --> 00:00:20,260
There are no hard truths, there are a few guidelines.

5
00:00:20,860 --> 00:00:26,140
The main idea that can guide you in this process is to go by the rule of failing fast.

6
00:00:26,620 --> 00:00:32,350
You want to execute the tests that take the least time in the beginning so that if they fail, you will

7
00:00:32,350 --> 00:00:33,450
get instant feedback.

8
00:00:33,730 --> 00:00:39,160
For example, say, does more tests, takes 15 minutes to complete four or any other tests.

9
00:00:39,640 --> 00:00:46,690
It doesn't really make sense to put a smoke test before the code quality test, which may fail in only

10
00:00:46,690 --> 00:00:47,380
30 seconds.

11
00:00:47,380 --> 00:00:48,030
For example.

12
00:00:48,280 --> 00:00:54,040
Typically you want to group tests or things either in parallel here you can execute multiple things

13
00:00:54,040 --> 00:01:00,040
at once or putting things that execute really, really fast in the beginning so that you don't execute

14
00:01:00,040 --> 00:01:01,690
the rest of the pipeline needlessly.

15
00:01:01,840 --> 00:01:06,700
In this case, even if called quality fails, the smoke test will still be executed.

16
00:01:06,700 --> 00:01:12,700
In this case, if I put a job that takes only a few seconds and in parallel with another one, which

17
00:01:12,700 --> 00:01:17,680
takes 15 minutes, as I said, then the entire stage will take 15 minutes to get answer.

18
00:01:17,680 --> 00:01:19,240
It will not automatically fail.

19
00:01:19,480 --> 00:01:22,600
So the smoke test will not be interrupted because the code quality fails.

20
00:01:22,990 --> 00:01:29,350
Now, if I would put a code quality or any other similar test in size before the test stage, before

21
00:01:29,350 --> 00:01:34,300
the smoke test, then if any of those would fail, then the entire pipeline will fail and we'll get

22
00:01:34,300 --> 00:01:35,120
a faster feedback.

23
00:01:35,500 --> 00:01:40,600
The main idea here is to play around with the jobs to understand what they are doing, how you can arrange

24
00:01:40,610 --> 00:01:42,730
them and when it makes sense to arrange them.

25
00:01:43,300 --> 00:01:49,030
For example, code quality can be even placed before the build itself because it doesn't rely on the

26
00:01:49,030 --> 00:01:49,920
build output.

27
00:01:49,930 --> 00:01:55,630
On the other hand, smoke tests must always be after the built do play around with the code quality

28
00:01:55,630 --> 00:02:00,150
before the build lives, a smoke test in the test stage and see how the pipeline works.

