File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 20
20
uses : actions/setup-python@v4
21
21
with :
22
22
python-version : 3.8
23
+
23
24
- name : Install dependencies
24
25
run : pip install -r requirements.txt
25
26
41
42
sarif-report : mapi.sarif
42
43
html-report : mapi.html
43
44
45
+ # Kill python if it's still running, ignoring any errors
46
+ - name : Shut down API
47
+ run : pgrep python3 | xargs kill || true
48
+
44
49
# Archive HTML report
45
50
- name : Archive Mayhem for API report
46
51
uses : actions/upload-artifact@v3
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ test-job:
10
10
- curl -Lo mapi https://mayhem4api.forallsecure.com/downloads/cli/latest/linux-musl/mapi && chmod +x mapi
11
11
- ./mapi login $MAPI_TOKEN
12
12
- ./mapi run forallsecure-mapi-action-examples auto "http://localhost:8000/openapi.json" --url "http://localhost:8000/" --junit junit.xml --sarif mapi.sarif --html mapi.html
13
+ # Kill python if it's still runner, ignoring any errors
14
+ - pgrep python3 | xargs kill || true
13
15
artifacts :
14
16
when : always
15
17
paths :
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ pipeline {
23
23
sh '''
24
24
./mapi run forallsecure-mapi-action-examples auto "http://localhost:8000/openapi.json" --url "http://localhost:8000/" --junit junit.xml --sarif mapi.sarif --html mapi.html
25
25
'''
26
+ /* Kill python if it's still running, ignoring any errors */
27
+ sh ' pgrep python3 | xargs kill || true'
26
28
}
27
29
post {
28
30
always {
You can’t perform that action at this time.
0 commit comments