Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions base-images
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lightbend/akka-base 2.0.19-cloudflow-akka-2.6.9-scala-2.12
lightbend/flink 2.0.19-cloudflow-flink-1.10.0-scala-2.12
63 changes: 63 additions & 0 deletions generate-report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash
set -euo pipefail

REPORT_NAME="$1"

REPORT_PAYLOAD=$(mktemp /tmp/report-payload.json.XXXXXX)

# Create report payload header
cat > $REPORT_PAYLOAD << EOF
{
"name": "${REPORT_NAME}",
"resources": {
"repositories": [
{
"name": "docker-local",
"include_path_patterns": [
EOF

# Tag and push the images to JFrog Artifactory for scanning
while read IMAGE TAG; do
echo "Pushing $IMAGE:$TAG to JFrog Artifactory"
JFROG_IMAGE="${IMAGE//./-}"
docker pull "$IMAGE:$TAG"
docker tag "$IMAGE:$TAG" "lightbendcloudflow-docker-local.jfrog.io/$JFROG_IMAGE:$TAG"
docker push "lightbendcloudflow-docker-local.jfrog.io/$JFROG_IMAGE:$TAG"

# Add path pattern for image to report payload
echo " \"/${JFROG_IMAGE}/${TAG}/*\"," >> $REPORT_PAYLOAD
done

# Remove the trailing comma from the last path pattern
sed -i '$ s/.$//' $REPORT_PAYLOAD

# Add report payload footer
cat >> $REPORT_PAYLOAD << EOF
]
}
]
}
}
EOF

# Wait for Artifactory to recognise any new images
sleep 10

echo ""
echo "Final report payload:"
cat $REPORT_PAYLOAD

echo ""

# Submit report for processing
REPORT_ID=$(curl -s -H "Content-Type: application/json" -XPOST -d @$REPORT_PAYLOAD \
--user ${JFROG_USERNAME}:${JFROG_API_KEY} \
https://lightbendcloudflow.jfrog.io/xray/api/v1/reports/vulnerabilities |
grep -oP '(?<="report_id":)[0-9]+')


echo "${REPORT_ID}"

rm $REPORT_PAYLOAD

# echo "$IMAGES"
10 changes: 10 additions & 0 deletions list-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -euo pipefail

for image in $(grep -oP '([a-zA-Z]+)(?=Image)' cloudflow-enterprise-components/values.yaml ); do
echo $(grep -oP "(?<=${image}Image: ).*" cloudflow-enterprise-components/values.yaml | tr -d "\"") \
$(grep -oP "(?<=${image}Version: ).*" cloudflow-enterprise-components/values.yaml | tr -d "\"")
done

echo $(grep -oP "(?<=image: ).*" cloudflow-enterprise-components/values.yaml | tr -d "\"") \
$(grep -oP "(?<=version: ).*" cloudflow-enterprise-components/values.yaml | tr -d "\"")
2 changes: 2 additions & 0 deletions operator-images
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lightbend/cloudflow-operator 2.0.19
lightbend/flinkk8soperator v0.5.0