forked from HurricaneLabs/TA-powershell_transcript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
28 lines (24 loc) · 966 Bytes
/
.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
image: python
stages:
- build
- splunktest
build:
stage: build
script:
- git archive --prefix ${CI_PROJECT_NAME}/ --format tar.gz ${CI_COMMIT_SHA} -o ${CI_PROJECT_NAME}.spl
artifacts:
paths:
- ${CI_PROJECT_NAME}.spl
splunktest:
stage: splunktest
image: python:3.7
script:
- wget --output-document splunk-appinspect.tar.gz https://download.splunk.com/misc/appinspect/splunk-appinspect-latest.tar.gz
- pip install splunk-appinspect.tar.gz
- mkdir /tmp/${CI_PROJECT_NAME}
- git archive --format tar HEAD | tar -xC /tmp/${CI_PROJECT_NAME}
- splunk-appinspect inspect /tmp/${CI_PROJECT_NAME} --mode precert --included-tags cloud
- splunk-appinspect inspect /tmp/${CI_PROJECT_NAME} --mode precert --included-tags cloud |grep "error:\\s 0\|failure:\s 0"
- echo "Pay attention to the values above ^^ both will cause your app to be rejected if they're > 0"
tags:
- docker