forked from cloudfoundry/service-fabrik-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
151 lines (151 loc) · 4.48 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
matrix:
include:
- language: go
os:
- linux
go:
- "1.17"
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.17"
git:
depth: 3
install:
- pushd interoperator
- ./scripts/install_test.sh
- popd
- cd operator-apis
- env GO111MODULE=on go mod download
- cd ..
script:
- pushd operator-apis
- env GO111MODULE=on go test -v -coverprofile=coverage.txt ./...
- popd
- language: go
os:
- linux
go:
- "1.17"
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.17"
git:
depth: 3
before_install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- go get golang.org/x/lint/golint
- go get -v honnef.co/go/tools/cmd/staticcheck
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/... ./
- PKGS=$(go list ./... | grep -v /vendor/)
- staticcheck $PKGS
- popd
- pushd webhooks
- go fmt ./pkg/webhooks/manager/... ./pkg/apis/...
- go vet ./pkg/webhooks/manager/... ./pkg/apis/...
- golint ./pkg/webhooks/manager/... ./pkg/apis/...
- popd
- pushd operator-apis
- go fmt ./internal/...
- go vet ./internal/...
- golint ./internal/...
- PKGS=$(go list ./... | grep -v /vendor/)
- staticcheck $PKGS
- popd
- language: node_js
node_js:
- "16.10"
env:
- SETTINGS_PATH="$(pwd)/broker/config/settings.yml"
script:
- pushd broker
- npm install -g yarn
- yarn set version 2.4.1
- yarn install
- "npm run test-coverall"
- popd
- language: node_js
node_js:
- "16.10"
env:
- SETTINGS_PATH="$(pwd)/broker/config/settings.yml"
script:
- pushd broker
- npm install -g yarn
- yarn set version 2.4.1
- yarn install
- "yarn run eslint"
- "yarn run jsdoc"
- "yarn constraints"
- popd
- language: node_js
node_js:
- "16.10"
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