Update JK
This commit is contained in:
parent
7a01e8f36e
commit
ef87a18c78
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -77,7 +77,7 @@ pipeline {
|
||||
dotnet list package --vulnerable || true
|
||||
|
||||
echo "=== OWASP Dependency-Check ==="
|
||||
rm -rf depcheck
|
||||
rm -rf depcheck dependency-check
|
||||
mkdir -p depcheck
|
||||
|
||||
API="https://api.github.com/repos/jeremylong/DependencyCheck/releases/latest"
|
||||
@ -85,7 +85,7 @@ pipeline {
|
||||
ASSET_URL=$(curl -fsSL "$API" | jq -r '.assets[]?.browser_download_url | select(test("release\\\\.zip$"))' | head -n1)
|
||||
echo "Downloading: $ASSET_URL"
|
||||
curl -fL --retry 3 --retry-all-errors -o depcheck.zip "$ASSET_URL"
|
||||
unzip -q depcheck.zip -d dependency-check
|
||||
unzip -oq depcheck.zip -d dependency-check
|
||||
|
||||
DC_BIN="dependency-check/dependency-check/bin/dependency-check.sh"
|
||||
|
||||
@ -105,6 +105,8 @@ pipeline {
|
||||
always {
|
||||
archiveArtifacts artifacts: 'depcheck/**', allowEmptyArchive: true
|
||||
// ถ้ามี HTML Publisher plugin จะโชว์รายงานสวยขึ้น
|
||||
script {
|
||||
try {
|
||||
publishHTML(target: [
|
||||
reportName: 'OWASP Dependency-Check',
|
||||
reportDir: 'depcheck',
|
||||
@ -113,6 +115,10 @@ pipeline {
|
||||
alwaysLinkToLastBuild: true,
|
||||
allowMissing: true
|
||||
])
|
||||
} catch (Throwable e) {
|
||||
echo "Skipping HTML report publish (plugin unavailable?): ${e.getClass().getSimpleName()}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user