-
Notifications
You must be signed in to change notification settings - Fork 8
/
.gitlab-ci.yml
139 lines (128 loc) · 3.39 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
stages:
- validate-app
- generate-data
- unit-tests
- unit-tests-1
- build-artifacts
pylint:
stage: validate-app
image: schose/pylint:latest
script:
- echo $appdir
- pylint --disable=missing-docstring,line-too-long,invalid-name,unused-import,reimported,pointless-statement,multiple-imports,trailing-whitespace,ungrouped-imports,trailing-newlines,logging-not-lazy,unused-variable,logging-too-many-args $appdir/bin/routerosint.py
- pylint --disable=missing-docstring,line-too-long,invalid-name,unused-import,reimported,pointless-statement,multiple-imports,trailing-whitespace,ungrouped-imports,trailing-newlines,logging-not-lazy,unused-variable,logging-too-many-args $appdir/bin/routerosperf.py
- pylint --disable=missing-docstring,line-too-long,invalid-name,unused-import,reimported,pointless-statement,multiple-imports,trailing-whitespace,ungrouped-imports,trailing-newlines,logging-not-lazy,unused-variable,logging-too-many-args,duplicate-key $appdir/bin/routerosinv.py
- exit 0
tags:
- docker
- build02
appinspect:
image: weberjas/appinspect:latest
stage: validate-app
script:
- find TA-routeros -type d -exec chmod 755 {} +
- find TA-routeros -type f -exec chmod 644 {} +
- splunk-appinspect inspect TA-routeros --excluded-tags=check_for_expansive_permissions --data-format junitxml --output-file appinspect_result.json --mode precert
- if grep failures=\"[1-9] appinspect_result.json; then exit 1; else exit 0; fi
artifacts:
paths:
- appinspect_result.json
when: always
expire_in: 3 days
tags:
- docker
- build01
# uses the Eventgen Docker image to recently-date the sample data
generate-data:
stage: generate-data
image: weberjas/eventgen7:latest
script:
- mkdir output
- cp -r $appdir/samples /samples
- pwd
- splunk_eventgen -v generate ./cicd/eventgen.conf
artifacts:
paths:
- ./output
expire_in: 1 day
only:
- merge_requests
- master
tags:
- docker
- build01
# runs the unit integration tests against Splunk version 8.1.0
splunk810:
stage: unit-tests
script:
- pwd
- ls -l
- cat output/*
- cicd/cicd_runner.sh splunk/splunk:8.1.0 cypress/included:5.0.0
only:
- merge_requests
- master
tags:
- build
- build02
- shell
# runs the unit integration tests against Splunk version 8.0.1
splunk801:
stage: unit-tests
script:
- pwd
- ls -l
- cat output/*
- cicd/cicd_runner.sh splunk/splunk:8.0.1 cypress/included:5.0.0
only:
- merge_requests
- master
tags:
- build
- build01
- shell
# runs the unit integration tests against Splunk version 8.0.1
splunk737:
stage: unit-tests
script:
- pwd
- ls -l
- cat output/*
- cicd/cicd_runner.sh splunk/splunk:7.3.7 cypress/included:5.0.0
only:
- merge_requests
- master
tags:
- build
- build02
- shell
splunk7210:
stage: unit-tests
script:
- pwd
- ls -l
- cat output/*
- cicd/cicd_runner.sh splunk/splunk:7.2.10 cypress/included:5.0.0
only:
- merge_requests
- master
tags:
- build
- build01
- shell
package:
stage: build-artifacts
script:
- mkdir -p build
- tar cfvz build/TA-routeros.tgz TA-routeros
artifacts:
paths:
- $CI_PROJECT_DIR/build
when: always
expire_in: 3 days
only:
- merge_requests
- master
tags:
- build
- shell