-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfileWindows
44 lines (43 loc) · 1.37 KB
/
JenkinsfileWindows
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
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building..'
powershell 'mvn package'
}
}
stage('SCA SC') {
steps {
withCredentials([string(credentialsId: 'SRCCLR_API_TOKEN', variable: 'SRCCLR_API_TOKEN')]) {
}
powershell """
Set-ExecutionPolicy AllSigned -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://download.srcclr.com/ci.ps1'))
srcclr scan --allow-dirty .
"""
}
}
stage('Veracode Pipeline Scan') {
steps {
powershell """
curl https://downloads.veracode.com/securityscan/pipeline-scan-LATEST.zip -o pipeline-scan.zip
Expand-Archive -Force -Path pipeline-scan.zip -DestinationPath veracode_scanner
java -jar veracode_scanner\\pipeline-scan.jar --veracode_api_id '${VERACODE_API_ID}' \
--veracode_api_key '${VERACODE_API_KEY}' \
--file target/verademo.war
"""
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
post {
always {
archiveArtifacts artifacts: 'results.json', fingerprint: true
}
}
}