Debian Codegraph @

ansible_collections/netapp_eseries/santricity/Jenkinsfile.blackduck

raw
1 // Copyright 2022 NetApp, Inc. All Rights Reserved.
2 // Licensed under the BSD-3-Clause.
3
4 // Set up build parameters so any branch can be manually rebuilt with different values.
5 properties([
6 parameters([
7 string(name: 'hubProjectVersion', defaultValue: '', description: 'Set this to force a BlackDuck scan and ' +
8 'manually tag it to a particular BlackDuck version (e.g. 1.0.1).')
9 ])
10 ])
11
12 hubProjectName = 'esg-ansible-santricity-collection'
13 hubProjectVersion = 'master'
14 if (params.hubProjectVersion != '') {
15 // Tag the manually selected version if the hubProjectVersion build parameter is set.
16 hubProjectVersion = params.hubProjectVersion
17 }
18
19 pipeline {
20 agent any
21
22 options {
23 timestamps()
24 timeout(time: 3, unit: 'HOURS')
25 buildDiscarder(logRotator(artifactNumToKeepStr: '15'))
26 }
27
28 stages {
29 stage("BlackDuck Scan") {
30 options {
31 timeout(time: 60, unit: 'MINUTES')
32 }
33
34 steps {
35
36
37 echo "Performing BlackDuck scanning..."
38 synopsys_detect detectProperties: """
39 --detect.project.name=${hubProjectName} \
40 --detect.project.version.name=${hubProjectVersion} \
41 --detect.cleanup=false \
42 --detect.project.code.location.unmap=true \
43 --detect.detector.search.depth=50 \
44 --detect.code.location.name=${hubProjectName}_${hubProjectVersion}_code \
45 --detect.bom.aggregate.name=${hubProjectName}_${hubProjectVersion}_bom \
46 --detect.excluded.directories=blackduck/ \
47 --detect.output.path=blackduck
48 """
49 }
50 post {
51 success {
52 archiveArtifacts(artifacts: 'blackduck/runs/**')
53 }
54 }
55 }
56 }
57 }