From 9e1e10c4d3f9e34a17728fbe58e5ed3e78a9b069 Mon Sep 17 00:00:00 2001 From: sander Date: Thu, 5 Nov 2026 23:03:39 +0100 Subject: [PATCH] testing --- Jenkinsfile | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 653ef9a..ac15841 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 {