-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
38 lines (38 loc) · 1.16 KB
/
Jenkinsfile
File metadata and controls
38 lines (38 loc) · 1.16 KB
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
pipeline {
agent any
environment {
CREDS = credentials('') //Insert the environment variable name stored in Jenkins.
}
stages {
stage('Run Python Script') {
agent {
docker {
image 'python:3.10.7-alpine'
}
}
steps {
sh 'python --version'
sh 'python -m venv env'
sh """
source ./env/bin/activate
python --version
python -m pip install veracode-api-signing
python -m pip install requests
export VERACODE_API_KEY_ID=$CREDS_USR
export VERACODE_API_KEY_SECRET=$CREDS_PSW
python GetBrokenDastScans.py
"""
}
}
}
post {
success {
echo 'This ran successfully!'
}
failure {
emailext body: 'Please take a look ASAP! \n\n${BUILD_LOG, maxLines=100, escapeHtml=false}',
to: "insertyouremailhere@test.com",
subject: 'Jenkins: A Veracode DAST scan is currently broken.'
}
}
}