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

go commands working locally but not in travis #8

Merged
merged 2 commits into from
Mar 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
use custom logic for sonar scanning
  • Loading branch information
Gus Parvin committed Mar 6, 2020
commit a2791fed126ff134a477d9799d8d4426e3725ba7
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
- |
make
make component/test/unit
make sonar/go || echo "Sonar/Go processing failed: rc=$?"
- stage: test-e2e
name: "Run e2e tests"
if: type = pull_request
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ default::
@echo "Build Harness Bootstrapped"

.PHONY: all test dependencies build-prod image rhel-image manager run deploy install \
fmt vet generate
fmt vet generate go-coverage

all: test manager

Expand Down Expand Up @@ -60,3 +60,11 @@ vet:
generate:
go generate ./pkg/... ./cmd/...

go-coverage:
$(shell go test -coverprofile=coverage.out -json ./...\
$$(go list ./... | \
grep -v '/vendor/' | \
grep -v '/docs/' \
) > report.json)
gosec --quiet -fmt sonarqube -out gosec.json -no-fail ./...
sonar-scanner --debug || echo "Sonar scanner is not available"
3 changes: 3 additions & 0 deletions build/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ set -e

export DOCKER_IMAGE_AND_TAG=${1}
# make docker/run

make go/gosec-install
make go-coverage