forked from checkmarx-ts/CxUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
69 lines (62 loc) · 1.56 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
@Library('sast')
import com.checkmarx.sast.jenkins.CxScan
import com.checkmarx.sast.jenkins.LineOfBusiness
import com.checkmarx.sast.jenkins.ProjectTypes
pipeline {
agent any
stages {
stage ('\u2776 ENV') {
steps {
script {
log.info "\u2600 BUILD_URL=${env.BUILD_URL}"
def workspace = pwd()
log.info "\u2600 workspace=${workspace}"
}
}
}
stage ('\u2777 SCM') {
steps {
script {
log.info 'Pulling source...'
git 'https://github.com/randygeyer/dvna.git'
}
}
}
stage ('\u2778 SCAN') {
steps {
script {
log.info 'Starting CxSAST scan...'
def appTeam = 'GoRide'
def appId = '12345'
def appName = 'App1'
def component = 'Component1'
def branch = 'Dev'
def environment = 'accept'
def cx = new CxScan(this, LineOfBusiness.AppSec, ProjectTypes.WebApp, appTeam, appId,
appName, component, branch, environment)
cx.addFolderExclusions('mytest,libs')
cx.addScanComment('testing 123...')
cx.doFullScan()
}
}
}
stage ('\u2778 OSA SCAN') {
steps {
script {
log.info 'Starting CxOSA scan...'
def appTeam = 'GoRide'
def appId = '12345'
def appName = 'App1'
def component = 'Component1'
def branch = 'Dev'
def environment = 'accept'
def cx = new CxScan(this, LineOfBusiness.AppSec, ProjectTypes.WebApp, appTeam, appId,
appName, component, branch, environment)
def includeFolders = 'libs'
def excludeFolders = ''
cx.doOsaScan(includeFolders, excludeFolders)
}
}
}
}
}