-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile.blackduck
55 lines (49 loc) · 1.87 KB
/
Jenkinsfile.blackduck
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
// Copyright 2022 NetApp, Inc. All Rights Reserved.
// Licensed under the BSD-3-Clause.
// Set up build parameters so any branch can be manually rebuilt with different values.
properties([
parameters([
string(name: 'hubProjectVersion', defaultValue: '', description: 'Set this to force a BlackDuck scan and ' +
'manually tag it to a particular BlackDuck version (e.g. 1.0.1).')
])
])
hubProjectName = 'esg-ansible-santricity-host-collection'
hubProjectVersion = 'master'
if (params.hubProjectVersion != '') {
// Tag the manually selected version if the hubProjectVersion build parameter is set.
hubProjectVersion = params.hubProjectVersion
}
pipeline {
agent any
options {
timestamps()
timeout(time: 3, unit: 'HOURS')
buildDiscarder(logRotator(artifactNumToKeepStr: '15'))
}
stages {
stage("BlackDuck Scan") {
options {
timeout(time: 60, unit: 'MINUTES')
}
steps {
echo "Performing BlackDuck scanning..."
synopsys_detect detectProperties: """
--detect.project.name=${hubProjectName} \
--detect.project.version.name=${hubProjectVersion} \
--detect.cleanup=false \
--detect.project.code.location.unmap=true \
--detect.detector.search.depth=50 \
--detect.code.location.name=${hubProjectName}_${hubProjectVersion}_code \
--detect.bom.aggregate.name=${hubProjectName}_${hubProjectVersion}_bom \
--detect.excluded.directories=blackduck/ \
--detect.output.path=blackduck
"""
}
post {
success {
archiveArtifacts(artifacts: 'blackduck/runs/**')
}
}
}
}
}