1- name : Download the Augmented SBOM
2- description : Downloads the Augmented SBOM for the project
1+ name : Augment the SBOM
2+ description : Augments the SBOM for the project
33inputs :
4- silk_asset_group :
5- description : The Silk Asset Group for the Project
6- required : true
4+ sbom_in_path :
5+ description : The path of the input sbom file.
6+ default : sbom.json
77 sbom_file_name :
88 description : The name of the augmented sbom file.
99 default : cyclonedx.sbom.json
10+ kondukto_sub_project :
11+ description : The Kondukto sub-project name (appended to the branch name)
12+ required : false
1013 artifactory_image :
1114 description : Image to use for artifactory
12- default : artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0
15+ default : artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0
16+ # no longer used
17+ silk_asset_group :
18+ description : The Silk Asset Group for the Project
19+ required : false
1320
1421runs :
1522 using : composite
1623 steps :
17- - name : Download the Augmented SBOM file to the release assets and s3 assets folders
24+ - name : Augments the SBOM file and writes it to the release assets and s3 assets folders
1825 shell : bash
26+ env :
27+ SBOM_IN_PATH : ${{ inputs.sbom_in_path }}
28+ KONDUKTO_SUB_PROJECT : ${{ inputs.kondukto_sub_project }}
29+ ARTIFACTORY_IMAGE : ${{ inputs.artifactory_image }}
30+ SBOM_FILE_NAME : ${{ inputs.sbom_file_name }}
1931 run : |
2032 set -eux
21- podman run --platform="linux/amd64" -it --rm -v ${RELEASE_ASSETS}:/pwd \
22- --env-file=${SILKBOMB_ENVFILE} \
23- ${{ inputs.artifactory_image }} \
24- download --silk-asset-group ${{ inputs.silk_asset_group }} --sbom-out /pwd/cyclonedx.sbom.json
25- cp ${RELEASE_ASSETS}/cyclonedx.sbom.json ${S3_ASSETS}/${{ inputs.sbom_file_name }}
33+ if [ -n "${KONDUKTO_SUB_PROJECT}" ]; then
34+ KONDUKTO_BRANCH="${GITHUB_REF_NAME}_${KONDUKTO_SUB_PROJECT}"
35+ else
36+ KONDUKTO_BRANCH="${GITHUB_REF_NAME}"
37+ fi
38+ echo "Generating SBOM file for ${KONDUKTO_BRANCH}..."
39+ podman run --platform="linux/amd64" -it --rm -v ${RELEASE_ASSETS}:/pwd -v $(pwd):/repo \
40+ --env-file=${KONDUKTO_ENVFILE} \
41+ ${ARTIFACTORY_IMAGE} \
42+ augment --sbom-in /repo/${SBOM_IN_PATH} --repo ${GITHUB_REPOSITORY} --branch ${KONDUKTO_BRANCH} --sbom-out /pwd/cyclonedx.sbom.json
43+ cp ${RELEASE_ASSETS}/cyclonedx.sbom.json ${S3_ASSETS}/${SBOM_FILE_NAME}
44+ echo "Generating SBOM file for ${KONDUKTO_BRANCH}... done."
0 commit comments