Skip to content

Commit

Permalink
Merge pull request #40 from maxmind/wes/fix-snyk-token
Browse files Browse the repository at this point in the history
Ensure Snyk only runs if `$SNYK_TOKEN` exists
  • Loading branch information
andyjack committed Oct 11, 2018
2 parents 82ac48a + a481e7e commit a1a27ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ env:
- secure: KXF3RVBZDxeASAnleYlTaqvxRRB9FSzSAdVV9h7Kw81+p4UO64b8CPJR1p4fLIVwAp8C4R8h0xZDN3pAv/iyeA4ndIeh9tQXNZBm737RE5x+6x6nf/shP/Em1w9T1s3KmretXoTFK5NJGv2yTesgaIAV/JV1OFvlG6ArswhrPFc=
- secure: M5ftg9qwzSuGMZ+wfcpvA/11Dg0KWwmP6skFm3gpxBmIMcpvwZd77QhVjnPZoTf+NSg/rGgmS0wIW8ZmuM19ihs8BKUBHQa2oXcehI0YWdAFH6EUOSxEz2Al2w8zHNDmECsIFzivHL21DhoeBi8FZh3/cmg6fzyBNnPB1kwRGQY=
before_install:
- "if [[ $RUN_SNYK ]]; then sudo apt-get install -y nodejs; fi"
- "if [[ $RUN_SNYK ]]; then npm install -g snyk; fi"
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then sudo apt-get install -y nodejs; fi"
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then npm install -g snyk; fi"
install:
- mvn install -DskipTests=true -Dgpg.skip=true
- "if [[ $RUN_SNYK ]]; then snyk test --org=maxmind; fi"
- "if [[ $RUN_SNYK && $SNYK_TOKEN ]]; then snyk test --org=maxmind; fi"
after_success:
- mvn clean cobertura:cobertura coveralls:report
- "if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' && $RUN_SNYK ]]; then snyk monitor --org=maxmind --project-name=maxmind/MaxMind-DB-Reader-java; fi"
- "if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' && $RUN_SNYK && $SNYK_TOKEN ]]; then snyk monitor --org=maxmind --project-name=maxmind/MaxMind-DB-Reader-java; fi"
notifications:
email:
on_failure: always
Expand Down

0 comments on commit a1a27ce

Please sign in to comment.