Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
daynewlee committed Feb 8, 2024
1 parent b140dd4 commit 35ac5f0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 245 deletions.
161 changes: 0 additions & 161 deletions .github/workflows/test-v4-dump.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions scripts/ci/jobs/diff-dumps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ create_offline_dump() {

cd /tmp/offline-dump
zip scanner-vuln-updates.zip scanner-defs.zip k8s-istio.zip

du -skh scanner-vuln-updates.zip
cmd=()
if is_in_PR_context; then
Expand All @@ -92,6 +93,22 @@ upload_offline_dump() {
if is_in_PR_context; then
cmd+=(echo "Would do")
fi
curl --silent --show-error --create-dirs -o out/RELEASE_VERSION.txt https://raw.githubusercontent.com/stackrox/stackrox/master/scanner/updater/version/RELEASE_VERSION
version_file="out/RELEASE_VERSION.txt"
# Use grep to extract X.Y versions, sort them, and get the last one as the latest
latest_version=$(grep -oE '^[0-9]+\.[0-9]+' "$version_file" | sort -V | tail -n 1)

curl --silent --show-error --max-time 60 --retry 3 https://storage.googleapis.com/scanner-v4-test/offline-bundles/scanner-v4-defs-${latest_version}.zip

file_to_check="scanner-v4-defs-${latest_version}.zip"

if [ -f "$file_to_check" ]; then
# If the file exists, add it to scanner-vuln-updates.zip
zip scanner-vuln-updates.zip "$file_to_check"
echo "$file_to_check added to scanner-vuln-updates.zip"
else
echo "$file_to_check does not exist."
fi
"${cmd[@]}" gsutil cp scanner-vuln-updates.zip gs://scanner-support-public/offline/v1/scanner-vuln-updates.zip
}

Expand Down
84 changes: 0 additions & 84 deletions scripts/ci/jobs/offline-v4-vuln.sh

This file was deleted.

0 comments on commit 35ac5f0

Please sign in to comment.