Skip to content

Commit

Permalink
Merge pull request #3028 from uselagoon/feature-flag-sbom
Browse files Browse the repository at this point in the history
feat: wrap sbom generation in feature flag
  • Loading branch information
shreddedbacon authored Feb 14, 2022
2 parents e6a7357 + 1e452df commit 1adc1a7
Showing 1 changed file with 16 additions and 14 deletions.
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

0 comments on commit 1adc1a7

Please sign in to comment.