Add an example how to run as part of a Jenkins declarative pipeline
moshen-maverick opened this issue · comments
Describe your use-case which is not covered by existing documentation.
We use Jenkins declarative pipelines to run all our builds. A few good examples how to use this plugin as part of a declarative pipeline will be excellent.
Using the example provided by the plugin pipeline syntax (step Amazon Inspector(archivePath: '', awsRegion: 'null', countCritical: 0, countHigh: 0, countLow: 10, countMedium: 5, credentialId: 'null', iamRole: '', sbomgenPath: '')) is not working and its not clear why
Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.
No response
Are you interested in contributing to the documentation?
No response
Thank you for feedback. Here is declarative pipeline example.
pipeline {
agent any
stages {
stage('amazon-inspector-image-scanner') {
steps {
script {
step([
$class: 'com.amazon.inspector.jenkins.amazoninspectorbuildstep.AmazonInspectorBuilder',
sbomgenPath: '<<Add Path>>',
archivePath: '<<Add Path>>',
awsRegion: 'us-east-1',
iamRole: '<<Add Role>>',
credentialId: '<<Add ID>>',
isThresholdEnabled: false/true,
countCritical: 0,
countHigh: 0,
countLow: 10,
countMedium: 5,
])
}
}
}
}
}
AWS documentation also updated with an example.