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

(chore): Unify downloader script for rhtap scanner #1395

Merged
merged 2 commits into from
Feb 6, 2024
Merged
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
4 changes: 3 additions & 1 deletion .tekton/scanner-db-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ spec:
- name: fetch-sql-definitions
image: registry.access.redhat.com/ubi8/ubi-minimal:latest
script: |
"$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" "$(workspaces.source.path)/source" pg-definitions.sql.gz
"$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" \
"$(workspaces.source.path)/source" \
pg-definitions.sql.gz
timeout: '10m'
workspaces:
- name: source
Expand Down
4 changes: 3 additions & 1 deletion .tekton/scanner-db-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ spec:
- name: fetch-sql-definitions
image: registry.access.redhat.com/ubi8/ubi-minimal:latest
script: |
"$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" "$(workspaces.source.path)/source" pg-definitions.sql.gz
"$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" \
"$(workspaces.source.path)/source" \
pg-definitions.sql.gz
timeout: '10m'
workspaces:
- name: source
Expand Down
7 changes: 6 additions & 1 deletion .tekton/scanner-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ spec:
image: registry.access.redhat.com/ubi8-minimal:latest
script: |
#!/usr/bin/env bash
"$(workspaces.source.path)/source/scripts/konflux/fetch-vuln-feed-data.sh" "$(workspaces.source.path)/source"
"$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" \
"$(workspaces.source.path)/source" \
nvd-definitions.zip \
k8s-definitions.zip \
repo2cpe.zip \
genesis_manifests.json
workspaces:
- name: source
workspace: workspace
Expand Down
7 changes: 6 additions & 1 deletion .tekton/scanner-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ spec:
image: registry.access.redhat.com/ubi8-minimal:latest
script: |
#!/usr/bin/env bash
"$(workspaces.source.path)/source/scripts/konflux/fetch-vuln-feed-data.sh" "$(workspaces.source.path)/source"
"$(workspaces.source.path)/source/scripts/konflux/fetch-scanner-data.sh" \
"$(workspaces.source.path)/source" \
nvd-definitions.zip \
k8s-definitions.zip \
repo2cpe.zip \
genesis_manifests.json
workspaces:
- name: source
workspace: workspace
Expand Down
2 changes: 1 addition & 1 deletion scripts/konflux/fetch-scanner-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -euo pipefail

if [[ "$#" < 2 ]]; then
if [[ "$#" -lt "2" ]]; then
>&2 echo "Error: please pass target directory and blob filename(s) as command line arguments."
>&2 echo "For example:"
>&2 echo " $(basename "${BASH_SOURCE[0]}") $(pwd) nvd-definitions.zip k8s-definitions.zip repo2cpe.zip genesis_manifests.json"
Expand Down
30 changes: 0 additions & 30 deletions scripts/konflux/fetch-vuln-feed-data.sh

This file was deleted.

Loading