Coverage for jaypore_ci/changelog.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.2.2, created at 2023-03-30 09:04 +0000

1from jaypore_ci.config import Version 

2 

3V = Version.parse 

4NEW = "🎁" 

5CHANGE = "⚙️" 

6BUGFIX = "🐞" 

7 

8version_map = { 

9 V("0.2.31"): { 

10 "changes": [ 

11 ( 

12 f"{NEW}: Old networks will also be removed automatically for " 

13 "jobs that are older than a week." 

14 ), 

15 ], 

16 "instructions": [], 

17 }, 

18 V("0.2.30"): { 

19 "changes": [ 

20 ( 

21 f"{NEW}: You can pass arbitrary arguments to the `docker run` " 

22 "command simply by using the `executor_kwargs` argument while " 

23 "defining the job. Read more in `Passing extra_hosts and other " 

24 "arguments to docker`_." 

25 ), 

26 f"{NEW}: SSH remotes are now compatible with Jaypore CI.", 

27 ], 

28 "instructions": [], 

29 }, 

30 V("0.2.29"): { 

31 "changes": [ 

32 ( 

33 f"{BUGFIX}: When gitea token does not have enough scope log" 

34 " correctly and exit" 

35 ) 

36 ], 

37 "instructions": [], 

38 }, 

39 V("0.2.28"): { 

40 "changes": [ 

41 ( 

42 f"{BUGFIX}: When there are multiple (push) remotes, Jaypore CI" 

43 " will pick the first one and use that." 

44 ) 

45 ], 

46 "instructions": [], 

47 }, 

48 V("0.2.27"): { 

49 "changes": [ 

50 ( 

51 f"{NEW}: Jobs older than 1 week will be removed before starting" 

52 " a new pipeline." 

53 ) 

54 ], 

55 "instructions": [], 

56 }, 

57 V("0.2.26"): { 

58 "changes": [ 

59 ( 

60 f"{CHANGE}: The Dockerfile inside `cicd/Dockerfile` now" 

61 " requires a build arg that specifies the version of Jaypore CI" 

62 " to install." 

63 ), 

64 ], 

65 "instructions": [ 

66 "Please run the Jaypore CI setup once again.", 

67 ], 

68 }, 

69 V("0.2.25"): { 

70 "changes": [ 

71 ( 

72 f"{NEW}: A dockerfile is now used to send context of the" 

73 " codebase to the docker daemon instead of directly mounting the" 

74 " code. This allows us to easily use remote systems for jobs" 

75 ) 

76 ], 

77 "instructions": [], 

78 }, 

79} 

80assert all( 

81 line.startswith(NEW) or line.startswith(CHANGE) or line.startswith(BUGFIX) 

82 for log in version_map.values() 

83 for line in log["changes"] 

84), "All change lines must start with one of NEW/CHANGE/BUGFIX"