forked from OWASP/NodeGoat
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJenkinsfile
71 lines (65 loc) · 2.22 KB
/
Jenkinsfile
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
pipeline {
agent any
tools {
nodejs "nodejs8grunt"
}
stages {
stage('PreBuild') {
steps{
echo 'started prebuild..'
sh 'npm install'
sh 'npm --version'
sh 'node --version'
sh 'npm run db:seed'
def ZAPADDRESS = 'http://192.168.1.195:9000'
}
}
stage('3rd party analysis'){
steps{
echo 'start analysis'
sh 'retire --exitwith 0 --outputpath 3rdparty-analysis.txt'
archiveArtifacts '3rdparty-analysis.txt'
sh 'license-checker --production > licenses-production.txt'
archiveArtifacts 'licenses-production.txt'
sh 'license-checker --development > licenses-development.txt'
archiveArtifacts 'licenses-development.txt'
}
}
stage('Build') {
steps{
echo 'started build..'
sh 'grunt jshint'
sh 'npm start > stdout.txt 2> stderr.txt & '
}
}
stage('Integration Testing') {
steps{
echo 'started integration testing..'
//sh 'npm install chromedriver'
sh 'npm install grunt-mocha --save-dev'
sh 'grunt mochaTest:end2end'
sh 'curl ${ZAPADDRESS}/OTHER/core/other/htmlreport/?apikey=dvarh87o132g62dtdst0d5ide7 > secproxy.html'
archiveArtifacts 'secproxy.html'
sh 'curl ${ZAPADDRESS}/OTHER/core/other/xmlreport/?apikey=dvarh87o132g62dtdst0d5ide7 > /secproxy.xml'
archiveArtifacts 'secproxy.xml'
//sh 'curl --insecure -H "Accept: application/json" -X POST --form "file=@./secproxy.xml" "https://192.168.99.100:8443/threadfix/rest/applications/1/upload?apiKey={Ja9yE6ZaUYHesgC5fyqoCV4zB43iIuwLrMxqCXtaG8}"' specific application.
}
}
stage('docker evaluation') {
steps{
echo 'analyzing with clair...'
}
}
stage('ZAP-test') {
steps{
echo 'started zaptesting..'
}
}
stage('Clean-up') {
steps {
//Optional Cleaning steps
echo 'Cleaning..'
}
}
}
}