-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-5904 update scripts and release instructions for SilkBomb 2.0 #1882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor tweaks. The failing tasks appear to be unrelated caused by flakiness in the docker hub gateway (sad).
@@ -269,7 +270,7 @@ signed-release: | |||
LET rel_tgz = "$rel_dir/$stem.tar.gz" | |||
LET rel_asc = "$rel_dir/$stem.tar.gz.asc" | |||
# Make the release archive: | |||
COPY (+release-archive/ --branch=$sbom_branch --prefix=$stem --ref=$ref) $rel_dir/ | |||
COPY (+release-archive/ --prefix=$stem --ref=$ref) $rel_dir/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can delete the ARG
sbom_branch
above since it is now unused.
Earthfile
Outdated
sbom-download: | ||
# sbom-validate: | ||
# Validate the SBOM Lite for the given branch. | ||
sbom-validate: | ||
FROM artifactory.corp.mongodb.com/dockerhub/library/alpine:3.20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This FROM
line can be deleted since the next line overrides it immediately. It looks like the duplicate FROM
was present in the prior version. That was a mistake.
docs/dev/releasing.rst
Outdated
2. Set the Earthly secrets required for the :any:`+sign-file` and | ||
:any:`+sbom-download` targets. | ||
2. Set the Earthly secrets required for the :any:`+sign-file` target. | ||
3. Download a recent augmented SBOM from Evergreen and save it to `etc/augmented-sbom.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Download a recent augmented SBOM from Evergreen and save it to `etc/augmented-sbom.json`. | |
3. Download a recent augmented SBOM from Evergreen, created by the standalone `sbom` task in the "SBOM" variant, and save it to `etc/augmented-sbom.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that silk asset groups are no longer required with Silkbomb 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. The --repo
and --branch
flags are now sufficient to associate uploaded/augmented SBOMs with a given project and branch. Asset group management is no longer necessary. 👏
.evergreen/scripts/sbom.sh
Outdated
command -v jq >/dev/null || { | ||
echo "missing required program jq" 1>&2 | ||
exit 1 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is jq
actually required? It doesn't appear to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not (used for diffs in the C++ Driver, which are not present here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be moved to an Earthfile
task, but would require another step to auth podman/Docker with Artifactory. It's fine as a standalone script since it's fairly trivial.
Added the |
docs/dev/earthly.rst
Outdated
Equivalent to `+sbom-generate` but uses the `--generate-new-serial-number` | ||
flag to generate a new unique serial number and reset the SBOM version to 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this docs line may fail, requiring two backticks around --generate-new-serial-number
. Recommend testing docs changes with make -C docs/dev serve
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch and thank you for the tip. Testing doc generation caught additional obsolete references to the old +sbom-download
target. Inspected the generated HTMLs and updated accordingly.
docs/dev/deps.rst
Outdated
The augmented SBOM is produced automatically and asynchronously as part of an | ||
external process that is not contained within the repository itself. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The augmented SBOM is produced automatically and asynchronously as part of an | |
external process that is not contained within the repository itself. The | |
The augmented SBOM is produced as part of an | |
external process that is not contained within the repository itself. The |
I expect producing the augmented SBOM is no longer asynchronous with the silkbomb augment
command.
Resolves CDRIVER-5904 for the master branch (EVG project:
mongo-c-driver
). Verified by this patch. Followup to #1875.Applies similar changes to mongodb/mongo-cxx-driver#1344 but for the C Driver. Unlike the C++ Driver, the C Driver's
sbom
task only performsvalidate
+augment
and simply uploads the Augmented SBOM file (no diffs) so it may be examined and downloaded during release steps when needed.Due to the current inability to download the Augmented SBOM outside of Evergreen with SilkBomb 2.0, the
+sbom-download
target and related commands, flags, and instructions are removed. In their place, a new release requirement is thatetc/augmented-sbom.json
is present when running+release-archive
or+signed-release
(this file does not need to be committed into the repo, it just needs to be present).This file must be downloaded from a recent execution of the
sbom
task (a patch build is OK!) during the release process prior to executing+release-archive
or+signed-release
. If the Augmented SBOM is not present, theCOPY
command in+release-archive
will fail with the following error (paraphrased for brevity):The
+sbom-update
and the new+sbom-validate
Earthly commands do not require being run inside Evergreen.