Skip to content

Commit f2955a8

Browse files
fetskofealebenpae
authored andcommitted
CLOUDP-301995: use Silkbomb 2.0 (replaces Silk usage with Kondukto) (#4117)
# Summary CLOUDP-301995 # Description - make updates to use Silkbomb 2.0 - assume IAM role to pull `KONDUKTO_TOKEN` from AWS Secrets Manager - assumption is that `kondukto_role_arn` variable is set in the Evergreen project with a value of `arn:aws:iam::119629040606:role/kondukto` - the concept of "asset groups" does not exist in Kondukto - SBOMs will not be uploaded to a Kondukto project's "branch" - the existing naming scheme for "asset groups" will now be used to determine the Kondukto "branch" to upload an SBOM to ## Proof of Work - TODO (may need some assistance here) - Q: can I simply trigger the `release_agent` variant to test? ## Checklist - [x] Have you linked a jira ticket and/or is the ticket in the title? - [x] Have you checked whether your jira ticket required DOCSP changes? - [x] Have you checked for release_note changes?
1 parent 57e8730 commit f2955a8

File tree

4 files changed

+110
-237
lines changed

4 files changed

+110
-237
lines changed

.evergreen-functions.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ variables:
77
- GRS_USERNAME
88
- OVERRIDE_VERSION_ID
99
- PKCS11_URI
10-
- SILK_CLIENT_ID
11-
- SILK_CLIENT_SECRET
1210
- branch_name
1311
- build_id
1412
- build_variant
@@ -478,6 +476,22 @@ functions:
478476
# docker buildx needs the moby/buildkit image when setting up a builder so we pull it from our mirror
479477
docker buildx create --driver=docker-container --driver-opt=image=268558157000.dkr.ecr.eu-west-1.amazonaws.com/docker-hub-mirrors/moby/buildkit:buildx-stable-1 --use
480478
docker buildx inspect --bootstrap
479+
- command: ec2.assume_role
480+
display_name: Assume IAM role with permissions to pull Kondukto API token
481+
params:
482+
role_arn: ${kondukto_role_arn}
483+
- command: shell.exec
484+
display_name: Pull Kondukto API token from AWS Secrets Manager and write it to file
485+
params:
486+
silent: true
487+
shell: bash
488+
include_expansions_in_env: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN]
489+
script: |
490+
set -e
491+
# use AWS CLI to get the Kondukto API token from AWS Secrets Manager
492+
kondukto_token=$(aws secretsmanager get-secret-value --secret-id "kondukto-token" --region "us-east-1" --query 'SecretString' --output text)
493+
# write the KONDUKTO_TOKEN environment variable to Silkbomb environment file
494+
echo "KONDUKTO_TOKEN=$kondukto_token" > ${workdir}/silkbomb.env
481495
- command: subprocess.exec
482496
retry_on_failure: true
483497
type: setup

pipeline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ def produce_sbom(build_configuration, args):
433433
elif args["platform"] == "amd64":
434434
platform = "linux/amd64"
435435
else:
436+
# TODO: return here?
436437
logger.error(f"Unrecognized architectures in {args}. Skipping SBOM generation")
437438
else:
438439
platform = "linux/amd64"
@@ -981,7 +982,7 @@ def build_image_generic(
981982
)
982983
# Sleep for a random time between 0 and 5 seconds to distribute daily builds better,
983984
# as we do a lot of things there that require network connections like:
984-
# - silk uploads, downloads
985+
# - Kondukto uploads, downloads
985986
# - image verification and signings
986987
# - manifest creations
987988
# - docker image pushes

scripts/evergreen/release/create_asset_group.sh

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)