CXX-3228 update scripts and release instructions for SilkBomb 2.0 #1344
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Resolves CXX-3228 for the master branch (EVG project:
mongo-cxx-driver
). Followup to #1340. Verified by this patch. Use this patch to reference related logs and files while reviewing the proposed changes.This PR is intended to serve as a template and reference for similar changes which will be applied to the C Driver, libmongocrypt, and relevant actively-maintained release branches.
Check Augmented SBOM
The
silk-check-augmented-sbom
task is updated to make use ofsilkbomb:2.0
. To account for theserialNumber
requirement which was manually implemented in #1340, some adjustments are made to the task:etc/augmented.sbom.json
. This file will always have a most-recently-updated timestamp, hence the removal of the--no-update-timestamp
flag. Therefore, thejq
command to format the Augmented SBOMs for comparison exclude themetadata.timestamp
field.--no-update-sbom-version
flag remains to ensure consistency between theversion
field of the SBOM Lite and Augmented SBOM documents. This will almost always remain a value of1
, as each new release will generate a newserialNumber
, resetting theversion
field.Upload SBOM Lite
Given SilkBomb 2.0's support for the
augment
command (replaces thedownload
command: on-demand generation of the Augmented SBOM rather than waiting for cron jobs to scan and augment the SBOM Lite via the Silk Asset Group'ssbom_lite_path
property), thesilk-check-augmented-sbom
task now depends on a newsilk-upload-sbom-lite
task which uploads the SBOM Lite per EVG build. This means the "Augmented SBOM (Updated)" will always be the most up-to-date it can be for the SBOM Lite that is committed for the given EVG patch or commit build.The
${branch_name}
Evergreen variable is used to specify the release branch for which the tasks are uploading/augmenting the SBOM via the--branch
flag. The--repo
and--branch
flags completely replace the need to manually create and maintain Silk Asset Groups for individual release branches. Therefore, related instructions have been removed frometc/releasing.md
.Note
Only the
upload
andaugment
commands must be run via Evergreen. Theupdate
command, which (re)generates the SBOM Lite (etc/cyclonedx.sbom.json
) using PURLs (etc/purls.txt
) may be run locally.Note
The
--update-license-text
and--select-licenses
flags are not necessary for our use cases.Release Instructions
Due to the
upload
andaugment
commands, both of which may be executed in the same EVG build, the release instructions are updated to simply download the "Augmented SBOM (Updated)" file and commit a sufficiently recent version into the repository prior to a release.The post-release instructions to create a new Silk Asset Group are now replaced with instructions to (re)generate the SBOM Lite with a new unique serial number. Care must be taken to ensure copyright, licenses, and other manually inserted or modified fields are preserved during this process (updates to
silkbomb:2.0
to better support this step are coming soon).Important
A new
serialNumber
must be generated post-release for all relevant release branches to ensure the next release has a uniqueserialNumber
. After a1.2.3
release, onlyreleases/v1.2
requires a newserialNumber
for the upcoming1.2.4
release. After a1.3.0
release, bothmaster
andreleases/v1.3
require a newserialNumber
for the upcoming1.4.0
and1.3.1
releases respectively.