Update JK
This commit is contained in:
parent
7a01e8f36e
commit
ef87a18c78
26
Jenkinsfile
vendored
26
Jenkinsfile
vendored
@ -77,7 +77,7 @@ pipeline {
|
|||||||
dotnet list package --vulnerable || true
|
dotnet list package --vulnerable || true
|
||||||
|
|
||||||
echo "=== OWASP Dependency-Check ==="
|
echo "=== OWASP Dependency-Check ==="
|
||||||
rm -rf depcheck
|
rm -rf depcheck dependency-check
|
||||||
mkdir -p depcheck
|
mkdir -p depcheck
|
||||||
|
|
||||||
API="https://api.github.com/repos/jeremylong/DependencyCheck/releases/latest"
|
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)
|
ASSET_URL=$(curl -fsSL "$API" | jq -r '.assets[]?.browser_download_url | select(test("release\\\\.zip$"))' | head -n1)
|
||||||
echo "Downloading: $ASSET_URL"
|
echo "Downloading: $ASSET_URL"
|
||||||
curl -fL --retry 3 --retry-all-errors -o depcheck.zip "$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"
|
DC_BIN="dependency-check/dependency-check/bin/dependency-check.sh"
|
||||||
|
|
||||||
@ -105,14 +105,20 @@ pipeline {
|
|||||||
always {
|
always {
|
||||||
archiveArtifacts artifacts: 'depcheck/**', allowEmptyArchive: true
|
archiveArtifacts artifacts: 'depcheck/**', allowEmptyArchive: true
|
||||||
// ถ้ามี HTML Publisher plugin จะโชว์รายงานสวยขึ้น
|
// ถ้ามี HTML Publisher plugin จะโชว์รายงานสวยขึ้น
|
||||||
publishHTML(target: [
|
script {
|
||||||
reportName: 'OWASP Dependency-Check',
|
try {
|
||||||
reportDir: 'depcheck',
|
publishHTML(target: [
|
||||||
reportFiles: 'dependency-check-report.html',
|
reportName: 'OWASP Dependency-Check',
|
||||||
keepAll: true,
|
reportDir: 'depcheck',
|
||||||
alwaysLinkToLastBuild: true,
|
reportFiles: 'dependency-check-report.html',
|
||||||
allowMissing: true
|
keepAll: true,
|
||||||
])
|
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