forked from cloudfoundry/service-fabrik-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
112 lines (112 loc) · 3.46 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
matrix:
include:
- language: go
os:
- linux
go:
- "1.13"
git:
depth: 3
install:
- cd interoperator
- env GO111MODULE=on go mod download
- cd ..
script:
- pushd interoperator
- ./scripts/install_test.sh
- env GO111MODULE=on go test -v -coverprofile=coverage.txt ./...
- popd
- cat interoperator/coverage.txt webhooks/coverage.txt | grep -v "/pkg/client/" > coverage.txt
after_success:
- bash <(curl -s https://codecov.io/bash)
- language: go
os:
- linux
go:
- "1.11"
git:
depth: 3
before_install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
install:
- pushd interoperator
- env KUBEBUILDER_VERSION=v1.0.7 ./scripts/install_test.sh
- popd
- cd webhooks
- dep ensure -v
- cd ..
script:
- pushd webhooks
- go test -v -coverpkg=./pkg/webhooks/... -coverprofile=coverage.txt ./pkg/webhooks/manager/...
- popd
- language: go
os:
- linux
go:
- "1.13"
git:
depth: 3
before_install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- go get golang.org/x/lint/golint
install:
- cd interoperator
- env GO111MODULE=on go mod download
- cd ../webhooks
- dep ensure -v
- cd ..
script:
- pushd interoperator
- env GO111MODULE=on go fmt ./api/... ./controllers/... ./internal/... ./pkg/... ./
- env GO111MODULE=on go vet ./api/... ./controllers/... ./internal/... ./pkg/... ./
- env GO111MODULE=on golint ./api/... ./controllers/... ./internal/... ./pkg/... ./
- popd
- pushd webhooks
- go fmt ./pkg/webhooks/manager/... ./pkg/apis/...
- go vet ./pkg/webhooks/manager/... ./pkg/apis/...
- golint ./pkg/webhooks/manager/... ./pkg/apis/...
- popd
- language: node_js
node_js:
- "8.14"
env:
- SETTINGS_PATH="$(pwd)/broker/config/settings.yml"
script:
- "npm run -s test-coverall"
- language: node_js
node_js:
- "8.14"
env:
- SETTINGS_PATH="$(pwd)/broker/config/settings.yml"
script:
- "npm run -s eslint"
- "npm run -s jsdoc"
- language: node_js
node_js:
- "8.14"
before_install:
# - pip install --user truffleHog==2.0.89
- |
pushd /tmp
git clone --depth 1 https://github.com/awslabs/git-secrets
cd git-secrets
sudo make install
popd
script:
- |
git secrets --install
git secrets --register-aws --global
git secrets --list
- |
git secrets --scan-history || exit 1
- |
# echo "Full repo scan of truffleHog"
# truffleHog only scans git endpoints which have a ref.
# truffleHog check fails to detect changed because travis merge creates a detached HEAD
# Creating a branch to fix this issue
# git checkout -b travis-merge
# INITIAL_COMMIT="a1206f7a64978e70441460f9f907c2904909a531"
# high_entropy=$(trufflehog --json --entropy true --max_depth 1 --regex "$TRAVIS_BUILD_DIR")
# echo "Truffle hog output : $high_entropy"
# if [[ "$high_entropy" != "" ]] ; then exit 1; fi