From f19c296bfa05e61a411106fc346293b6ad841396 Mon Sep 17 00:00:00 2001 From: Patrick Lonergan Date: Thu, 23 Aug 2018 20:32:01 -0700 Subject: [PATCH 1/7] Initial Fossa configuration --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 96004c13ed..694f90c030 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,3 +25,13 @@ before_script: - mysql -u root -e 'set GLOBAL innodb_file_format = "barracuda"' - mysql -u root -e 'GRANT ALL ON *.* TO 'travis'@'localhost';' script: bundle exec rake $TASK +jobs: + include: + - stage: fossa + before_script: curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash + script: + - fossa init + - fossa analyze --branch master + env: "" + services: "" + addons: "" From eef5de808260eb5da58064691d697480eb7c50bf Mon Sep 17 00:00:00 2001 From: Patrick Lonergan Date: Thu, 23 Aug 2018 20:52:11 -0700 Subject: [PATCH 2/7] With sudo added --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 694f90c030..b03646d923 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ cache: directories: - tmp/rubocop_cache - node_modules -sudo: false +sudo: required branches: only: master env: From ee21dcba74886ecb3f91558f3d071bde232138ab Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Mon, 27 Aug 2018 10:52:30 -0700 Subject: [PATCH 3/7] run as non-root --- .travis.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index b03646d923..1fa6033349 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ cache: directories: - tmp/rubocop_cache - node_modules -sudo: required +sudo: false branches: only: master env: @@ -25,13 +25,12 @@ before_script: - mysql -u root -e 'set GLOBAL innodb_file_format = "barracuda"' - mysql -u root -e 'GRANT ALL ON *.* TO 'travis'@'localhost';' script: bundle exec rake $TASK + +# make sure we can release as apache v2 jobs: include: - stage: fossa - before_script: curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash - script: - - fossa init - - fossa analyze --branch master - env: "" - services: "" - addons: "" + before_script: + - curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sed 's/askRoot mv/#askRoot mv/' | sed 's/trap cleanup/#/' | bash # https://github.com/fossas/fossa-cli/issues/232 + - /tmp/install-fossa-cli/fossa init + script: /tmp/install-fossa-cli/fossa analyze # will fail to upload when missing api key From 101e4b3632d9c9d4602eef7f4f7bb00df5a174a5 Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Mon, 27 Aug 2018 11:02:56 -0700 Subject: [PATCH 4/7] parallelize fossa --- .travis.yml | 8 +++++--- README.md | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1fa6033349..e8262131ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,10 +27,12 @@ before_script: script: bundle exec rake $TASK # make sure we can release as apache v2 -jobs: +matrix: include: - - stage: fossa + - env: TASK=fossa # nice label for UI before_script: - curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sed 's/askRoot mv/#askRoot mv/' | sed 's/trap cleanup/#/' | bash # https://github.com/fossas/fossa-cli/issues/232 - /tmp/install-fossa-cli/fossa init - script: /tmp/install-fossa-cli/fossa analyze # will fail to upload when missing api key + script: + - /tmp/install-fossa-cli/fossa analyze # analyze dependencies and upload them (fails when missing api key) + - /tmp/install-fossa-cli/fossa test # wait for fossa to analyse the upload and fail if it finds issues diff --git a/README.md b/README.md index b606c4ffda..a4ef6ad7bc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build Status](https://travis-ci.org/zendesk/samson.svg?branch=master)](https://travis-ci.org/zendesk/samson) [![DockerHub Status](https://img.shields.io/docker/stars/zendesk/samson.svg)](https://hub.docker.com/r/zendesk/samson) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fzendesk%2Fsamson.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fzendesk%2Fsamson?ref=badge_shield) [Demo](https://samson-demo.herokuapp.com) From 1b97555767fdc5093c4924f51a3f43fa8437f1f0 Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Mon, 27 Aug 2018 11:07:48 -0700 Subject: [PATCH 5/7] commit config so it is obvious what is going on --- .travis.yml | 5 ++--- config/fossa.yml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100755 config/fossa.yml diff --git a/.travis.yml b/.travis.yml index e8262131ef..6ee82367b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,6 @@ matrix: - env: TASK=fossa # nice label for UI before_script: - curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sed 's/askRoot mv/#askRoot mv/' | sed 's/trap cleanup/#/' | bash # https://github.com/fossas/fossa-cli/issues/232 - - /tmp/install-fossa-cli/fossa init script: - - /tmp/install-fossa-cli/fossa analyze # analyze dependencies and upload them (fails when missing api key) - - /tmp/install-fossa-cli/fossa test # wait for fossa to analyse the upload and fail if it finds issues + - /tmp/install-fossa-cli/fossa analyze --config config/fossa.yml # analyze dependencies and upload them (fails when missing api key) + - /tmp/install-fossa-cli/fossa test # wait for fossa to analyse the upload and fail if it finds issues, to add ignores contact legal@zendesk.com with subject "FOSSA ignore in samson" diff --git a/config/fossa.yml b/config/fossa.yml new file mode 100755 index 0000000000..0da162649b --- /dev/null +++ b/config/fossa.yml @@ -0,0 +1,18 @@ +# Generated by FOSSA CLI (https://github.com/fossas/fossa-cli) +# Visit https://fossa.io to learn more + +version: 1 +cli: + server: https://app.fossa.io + fetcher: custom + project: git@github.com:zendesk/samson.git +analyze: + modules: + - name: Samson + type: npm + target: . + path: . + - name: Gemfile + type: gem + target: . + path: . From df61668e357f013333b3a8900f025155b838c113 Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Tue, 28 Aug 2018 21:16:23 -0700 Subject: [PATCH 6/7] use new LOCAL=true flag to avoid issues --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ee82367b0..d856ed0846 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ matrix: include: - env: TASK=fossa # nice label for UI before_script: - - curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sed 's/askRoot mv/#askRoot mv/' | sed 's/trap cleanup/#/' | bash # https://github.com/fossas/fossa-cli/issues/232 + - export LOCAL=true && curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash script: - - /tmp/install-fossa-cli/fossa analyze --config config/fossa.yml # analyze dependencies and upload them (fails when missing api key) - - /tmp/install-fossa-cli/fossa test # wait for fossa to analyse the upload and fail if it finds issues, to add ignores contact legal@zendesk.com with subject "FOSSA ignore in samson" + - ./fossa analyze --config config/fossa.yml # analyze dependencies and upload them (fails when missing api key) + - ./fossa test # wait for fossa to analyse the upload and fail if it finds issues, to add ignores contact legal@zendesk.com with subject "FOSSA ignore in samson" From f2fbc75bedca6c5562f7734849b4da403e11701d Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Fri, 31 Aug 2018 15:06:47 -0700 Subject: [PATCH 7/7] make fossa test work --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d856ed0846..3fe74b0216 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,4 +34,4 @@ matrix: - export LOCAL=true && curl -H 'Cache-Control:no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash script: - ./fossa analyze --config config/fossa.yml # analyze dependencies and upload them (fails when missing api key) - - ./fossa test # wait for fossa to analyse the upload and fail if it finds issues, to add ignores contact legal@zendesk.com with subject "FOSSA ignore in samson" + - ./fossa test --config config/fossa.yml # wait for fossa to analyse the upload and fail if it finds issues, to add ignores contact legal@zendesk.com with subject "FOSSA ignore in samson"