message: file size function
diff: @@ -11,22 +11,20 @@ echo "Running sbom scan using syft"
  echo "Image being scanned: ${IMAGE_FULL}"
  set +x
  -
  DOCKER_HOST=docker-host.lagoon.svc docker run --rm -v /var/run/docker.sock:/var/run/docker.sock imagecache.amazeeio.cloud/anchore/syft packages ${IMAGE_FULL} -o ${SBOM_OUTPUT} | gzip > ${SBOM_OUTPUT_FILE}
  -# FILESIZE=$(stat -f%z "$IMAGE_FULL")
  -FILESIZE=$(stat -c%s "$SBOM_OUTPUT_FILE")
  +IMAGE_FULL="/Users/tim.clifford/playground/fleet-portal.ch/fleet-portal-ch.gz"
  +SBOM_OUTPUT_FILE="/Users/tim.clifford/playground/fleet-portal.ch/fleet-portal-ch.gz"
  +
  +FILESIZE=$(stat -f%z "$IMAGE_FULL")
  +# FILESIZE=$(stat -c%s "$SBOM_OUTPUT_FILE")
  echo "Size of ${SBOM_OUTPUT_FILE} = $FILESIZE bytes."
  checkFileSizeLimit() {
  if (( $FILESIZE > 950000 )); then
  echo "$SBOM_OUTPUT_FILE is too large, skipping pushing to configmap"
  return
  - fi
  -}
  -
  -checkFileSizeLimit
  -
  + else
  if [ -f "${SBOM_OUTPUT_FILE}" ]; then
  echo "Successfully generated SBOM for ${IMAGE_FULL}"
  SBOM_CONFIGMAP=lagoon-sbom-${IMAGE_NAME}
  @@ -68,3 +66,7 @@ if [ -f "${SBOM_OUTPUT_FILE}" ]; then
  else
  echo "Failed to generate SBOM for ${IMAGE_FULL}"
  fi
  + fi
  +}
  +
  +checkFileSizeLimit
  