Skip to content

Commit dd2fb53

Browse files
authored
Merge branch 'main' into bad-login-endpoint
2 parents c7ad466 + bc82894 commit dd2fb53

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.github/workflows/mapi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
uses: actions/setup-python@v4
2121
with:
2222
python-version: 3.8
23+
2324
- name: Install dependencies
2425
run: pip install -r requirements.txt
2526

@@ -41,6 +42,10 @@ jobs:
4142
sarif-report: mapi.sarif
4243
html-report: mapi.html
4344

45+
# Kill python if it's still running, ignoring any errors
46+
- name: Shut down API
47+
run: pgrep python3 | xargs kill || true
48+
4449
# Archive HTML report
4550
- name: Archive Mayhem for API report
4651
uses: actions/upload-artifact@v3

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ test-job:
1010
- curl -Lo mapi https://mayhem4api.forallsecure.com/downloads/cli/latest/linux-musl/mapi && chmod +x mapi
1111
- ./mapi login $MAPI_TOKEN
1212
- ./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
1315
artifacts:
1416
when: always
1517
paths:

Jenkinsfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pipeline {
2323
sh '''
2424
./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
2525
'''
26+
/* Kill python if it's still running, ignoring any errors */
27+
sh 'pgrep python3 | xargs kill || true'
2628
}
2729
post {
2830
always {

0 commit comments

Comments
 (0)