Skip to content

Commit

Permalink
Fossa integration (cadence-workflow#3162)
Browse files Browse the repository at this point in the history
* Add .fossa.yml
* Add buildkite steps for fossa
  • Loading branch information
meiliang86 authored Apr 3, 2020
1 parent c23cd65 commit 0a7f74b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
steps:
- label: "fossa analyze"
agents:
queue: "init"
docker: "*"
command: "./scripts/buildkite/fossa.sh"
- label: ":golang: unit test"
agents:
queue: "workers"
Expand Down
31 changes: 31 additions & 0 deletions .fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2
cli:
server: https://app.fossa.com
fetcher: custom
project: [email protected]:uber/cadence.git
analyze:
modules:
- name: github.com/uber/cadence/cmd/canary
type: go
target: github.com/uber/cadence/cmd/canary
path: cmd/canary
- name: github.com/uber/cadence/cmd/server
type: go
target: github.com/uber/cadence/cmd/server
path: cmd/server
- name: github.com/uber/cadence/cmd/tools/cassandra
type: go
target: github.com/uber/cadence/cmd/tools/cassandra
path: cmd/tools/cassandra
- name: github.com/uber/cadence/cmd/tools/cli
type: go
target: github.com/uber/cadence/cmd/tools/cli
path: cmd/tools/cli
- name: github.com/uber/cadence/cmd/tools/copyright
type: go
target: github.com/uber/cadence/cmd/tools/copyright
path: cmd/tools/copyright
- name: github.com/uber/cadence/cmd/tools/sql
type: go
target: github.com/uber/cadence/cmd/tools/sql
path: cmd/tools/sql
14 changes: 14 additions & 0 deletions scripts/buildkite/fossa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -exo pipefail

curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash -s -- -b ~/

~/fossa init
~/fossa analyze

# Capture the exit status
EXIT_STATUS=$?

echo "fossa script exits with status $EXIT_STATUS"
exit $EXIT_STATUS

0 comments on commit 0a7f74b

Please sign in to comment.