Skip to content
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

feat: wrap sbom generation in feature flag #3028

Merged
merged 2 commits into from
Feb 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions images/kubectl-build-deploy-dind/build-deploy-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1696,20 +1696,22 @@ patchBuildStep "${buildStartTime}" "${previousStepEnd}" "${currentStepEnd}" "${N
previousStepEnd=${currentStepEnd}
set -x

##############################################
### RUN sbom generation and store in configmap
##############################################
if [ "$(featureFlag INSIGHTS)" = enabled ]; then
##############################################
### RUN sbom generation and store in configmap
##############################################

for IMAGE_NAME in "${!IMAGES_BUILD[@]}"
do
for IMAGE_NAME in "${!IMAGES_BUILD[@]}"
do

IMAGE_TAG="${IMAGE_TAG:-latest}"
IMAGE_FULL="${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG}"
. /kubectl-build-deploy/scripts/exec-generate-sbom-configmap.sh
done
IMAGE_TAG="${IMAGE_TAG:-latest}"
IMAGE_FULL="${REGISTRY}/${PROJECT}/${ENVIRONMENT}/${IMAGE_NAME}:${IMAGE_TAG}"
. /kubectl-build-deploy/scripts/exec-generate-sbom-configmap.sh
done

set +x
currentStepEnd="$(date +"%Y-%m-%d %H:%M:%S")"
patchBuildStep "${buildStartTime}" "${previousStepEnd}" "${currentStepEnd}" "${NAMESPACE}" "sbomCompleted" "SBOM Gathering"
previousStepEnd=${currentStepEnd}
set -x
set +x
currentStepEnd="$(date +"%Y-%m-%d %H:%M:%S")"
patchBuildStep "${buildStartTime}" "${previousStepEnd}" "${currentStepEnd}" "${NAMESPACE}" "sbomCompleted" "SBOM Gathering"
previousStepEnd=${currentStepEnd}
set -x
fi