X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fsbom-generator.sh;h=8b1fd3570d3c9d9e1e5674e42d51bfdd95109a83;hb=20d349ca5514cb566874e21e2a68ef682d69c072;hp=f3e657b003bed695dbf9143d87f2a5fb1f0f575c;hpb=dce223775bacca596e11f2eb2b064b6ca3fd40da;p=releng%2Fglobal-jjb.git diff --git a/shell/sbom-generator.sh b/shell/sbom-generator.sh index f3e657b0..8b1fd357 100644 --- a/shell/sbom-generator.sh +++ b/shell/sbom-generator.sh @@ -25,8 +25,12 @@ if ! wget -nv "${URL}" -O "${SBOM_LOCATION}"; then echo "wget ${SBOM_GENERATOR_VERSION} failed" exit 1; fi -tar -xvf "${SBOM_LOCATION}" +# Extract SBOM bin in SBOM_PATH +# This is a workaround until the --path flag works +# https://github.com/opensbom-generator/spdx-sbom-generator/issues/227 +tar -xzf "${SBOM_LOCATION}" -C ${SBOM_PATH} echo "INFO: running spdx-sbom-generator" +cd ${SBOM_PATH} ./spdx-sbom-generator "${SBOM_FLAGS:-}" -o "${WORKSPACE}"/m2repo mv spdx-sbom-generator /tmp/ rm /tmp/spdx*