Update Jenkinsfile
Some checks failed
jenkins_organization/checksum_verification_and_signature_verification/pipeline/head There was a failure building this commit

This commit is contained in:
first_admin 2024-09-01 20:15:22 +00:00
parent 2f87a89904
commit ec2603cd19

10
Jenkinsfile vendored
View File

@ -14,9 +14,13 @@ pipeline {
// Weryfikacja sumy kontrolnej dla każdego pakietu
for (dep in dependencies) {
sh "npm pack ${dep}@\$(jq -r '.dependencies[\"${dep}\"]' package.json)"
sh "sha256sum ${dep}-*.tgz > ${dep}.sha256"
// Weryfikacja sumy kontrolnej (przykład: zakładając, że masz zapisany poprawny checksum)
sh "echo 'expected-sha256-value ${dep}-*.tgz' | sha256sum -c -"
sh """
FILENAME=\$(ls ${dep}-*.tgz)
SHA256_SUM=\$(sha256sum \$FILENAME | awk '{ print \$1 }')
echo \"\${SHA256_SUM} \$FILENAME\" > ${dep}.sha256
sha256sum -c ${dep}.sha256
"""
}
// Instalacja dependencies