forked from cloudfoundry/service-fabrik-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (44 loc) · 1.57 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
---
language: node_js
node_js:
- "6.9"
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
env:
- SETTINGS_PATH="$(pwd)/broker/config/settings.yml"
script:
- |
git secrets --install
git secrets --register-aws --global
git secrets --list
IFS='' CHANGED_FILES=$(npm run -s jsformat -- | grep -v "unchanged")
[[ -z $CHANGED_FILES ]] && NUM_CHANGED_FILES=0 || NUM_CHANGED_FILES=$(echo $CHANGED_FILES | wc -l)
echo "Code formatting to be fixed in $NUM_CHANGED_FILES file(s)..."
if [[ $NUM_CHANGED_FILES -gt 0 ]]; then
echo "Listing modifications required.."
git diff
echo "FAILED: Run js-beautify(npm run jsformat)" && exit 1;
else
echo "No changes to the code formatting required.. "
fi
- "npm run -s jshint-ci"
- "npm run -s test-coverall"
- "npm run -s jsdoc"
- |
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="26697a04e6890c0fc2226cf8c4e228c95586254c"
# high_entropy=$(trufflehog --json --entropy true --since_commit "$INITIAL_COMMIT" --regex "$TRAVIS_BUILD_DIR")
# echo "Truffle hog output : $high_entropy"
# if [[ "$high_entropy" != "" ]] ; then exit 1; fi