Add branch name to fossa analysis (#2545)

Also update/reduce the .fossa.yml configuration file

Signed-off-by: Daniel Hiller <dhiller@redhat.com>

Signed-off-by: Daniel Hiller <dhiller@redhat.com>
Co-authored-by: kubevirt-bot <kubevirtbot@redhat.com>
This commit is contained in:
Daniel Hiller 2023-01-19 01:11:07 +01:00 committed by GitHub
parent 80e0dab163
commit 0114d19c29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 60 deletions

View File

@ -2,12 +2,11 @@
# Visit https://fossa.com to learn more # Visit https://fossa.com to learn more
version: 3 version: 3
cli:
server: https://app.fossa.com project:
project: id: git@github.com:kubevirt/containerized-data-importer.git
id: git@github.com:kubevirt/containerized-data-importer.git name: containerized-data-importer
name: containerized-data-importer team: KubeVirt
team: KubeVirt
targets: targets:
exclude: exclude:
- type: gradle - type: gradle
@ -18,55 +17,3 @@ paths:
- cluster-up - cluster-up
- staging - staging
analyze:
modules:
- name: cdi-apiserver
type: go
target: 'kubevirt.io/containerized-data-importer/cmd/cdi-apiserver'
path: cmd/cdi-apiserver
options:
modules-vendor: true
strategy: gomodules
- name: cdi-cloner
type: go
target: 'kubevirt.io/containerized-data-importer/cmd/cdi-cloner'
path: cmd/cdi-cloner
options:
modules-vendor: true
strategy: gomodules
- name: cdi-controller
type: go
target: 'kubevirt.io/containerized-data-importer/cmd/cdi-controller'
path: cmd/cdi-controller
options:
modules-vendor: true
strategy: gomodules
- name: cdi-importer
type: go
target: 'kubevirt.io/containerized-data-importer/cmd/cdi-importer'
path: cmd/cdi-importer
options:
modules-vendor: true
strategy: gomodules
- name: cdi-operator
type: go
target: 'kubevirt.io/containerized-data-importer/cmd/cdi-operator'
path: cmd/cdi-operator
options:
modules-vendor: true
strategy: gomodules
- name: cdi-uploadproxy
type: go
target: 'kubevirt.io/containerized-data-importer/cmd/cdi-uploadproxy'
path: cmd/cdi-uploadproxy
options:
modules-vendor: true
strategy: gomodules
- name: cdi-uploadserver
type: go
target: 'kubevirt.io/containerized-data-importer/cmd/cdi-uploadserver'
path: cmd/cdi-uploadserver
options:
modules-vendor: true
strategy: gomodules

View File

@ -161,7 +161,7 @@ build-docgen:
${DO_BAZ} "BUILD_ARCH=${BUILD_ARCH} ./hack/build/bazel-build-metricsdocs.sh" ${DO_BAZ} "BUILD_ARCH=${BUILD_ARCH} ./hack/build/bazel-build-metricsdocs.sh"
fossa: fossa:
${DO_BAZ} "FOSSA_TOKEN_FILE=${FOSSA_TOKEN_FILE} ./hack/fossa.sh" ${DO_BAZ} "FOSSA_TOKEN_FILE=${FOSSA_TOKEN_FILE} PULL_BASE_REF=${PULL_BASE_REF} CI=${CI} ./hack/fossa.sh"
help: help:
@echo "Usage: make [Targets ...]" @echo "Usage: make [Targets ...]"

View File

@ -3,6 +3,10 @@
set -euo pipefail set -euo pipefail
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
FOSSA_API_KEY="$(cat $FOSSA_TOKEN_FILE)" fossa analyze FOSSA_OPTS=""
if [[ "${CI:-}" == "true" ]]; then
FOSSA_OPTS="--branch=$PULL_BASE_REF"
fi
FOSSA_API_KEY="$(cat $FOSSA_TOKEN_FILE)" fossa analyze $FOSSA_OPTS
FOSSA_API_KEY="$(cat $FOSSA_TOKEN_FILE)" fossa test --timeout=1800 FOSSA_API_KEY="$(cat $FOSSA_TOKEN_FILE)" fossa test --timeout=1800