testing
This commit is contained in:
31
Jenkinsfile
vendored
31
Jenkinsfile
vendored
@@ -86,16 +86,41 @@ pipeline {
|
||||
steps {
|
||||
sh '''
|
||||
echo "=== Generate SBOM ==="
|
||||
syft dir:. -o cyclonedx-json=flashread-sbom.json
|
||||
syft dir:. -o cyclonedx-json=fast_reader-sbom.json
|
||||
|
||||
echo "=== Scan SBOM for vulnerabilities ==="
|
||||
grype sbom:flashread-sbom.json -o table
|
||||
grype sbom:fast_reader-sbom.json -o table
|
||||
'''
|
||||
|
||||
archiveArtifacts artifacts: 'flashread-sbom.json',
|
||||
archiveArtifacts artifacts: 'fast_reader-sbom.json',
|
||||
fingerprint: true
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish to Nexus') {
|
||||
steps {
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: 'nexus-fast_reader',
|
||||
usernameVariable: 'NEXUS_USERNAME',
|
||||
passwordVariable: 'NEXUS_PASSWORD'
|
||||
)]) {
|
||||
sh '''
|
||||
echo "=== Upload FlashRead binary ==="
|
||||
curl --fail --silent --show-error \
|
||||
--user "$NEXUS_USERNAME:$NEXUS_PASSWORD" \
|
||||
--upload-file build/bin/fast_reader \
|
||||
http://nexus:8081/repository/fast_reader-releases/fast_reader/0.1.0/linux-amd64/fast_reader
|
||||
|
||||
echo "=== Upload SBOM ==="
|
||||
curl --fail --silent --show-error \
|
||||
--user "$NEXUS_USERNAME:$NEXUS_PASSWORD" \
|
||||
--upload-file fast_reader-sbom.json \
|
||||
http://nexus:8081/repository/fast_reader-releases/fast_reader/0.1.0/fast_reader-sbom.json
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
Reference in New Issue
Block a user