diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index ba5d13d7a..8c6264859 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -9,4 +9,16 @@ steps: - docker-compose#v3.0.0: run: unit-test config: docker/buildkite/docker-compose.yaml + + - label: ":alien: Fossa scan" + agents: + queue: "default" + docker: "*" + command: "fossa init --include-all --no-ansi; fossa analyze --no-ansi -b $${BUILDKITE_BRANCH:-$$(git branch --show-current)}; fossa test --timeout 1800 --no-ansi" + timeout_in_minutes: 60 + plugins: + - docker-compose#v3.0.0: + run: fossa + config: docker/buildkite/docker-compose.yaml + - wait diff --git a/docker/buildkite/Dockerfile b/docker/buildkite/Dockerfile index 2c62dbb9d..261c8bc29 100644 --- a/docker/buildkite/Dockerfile +++ b/docker/buildkite/Dockerfile @@ -12,5 +12,8 @@ RUN apk update && apk add --virtual wget ca-certificates wget && apk add protobu # Git is needed in order to update the dls submodule RUN apk add --virtual git +# Fossa to run license scans +RUN wget -O- https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sh + RUN mkdir /temporal-java-samples WORKDIR /temporal-java-samples diff --git a/docker/buildkite/docker-compose.yaml b/docker/buildkite/docker-compose.yaml index f19fbb834..f84c27b1a 100644 --- a/docker/buildkite/docker-compose.yaml +++ b/docker/buildkite/docker-compose.yaml @@ -10,3 +10,14 @@ services: - "USER=unittest" volumes: - "../../:/temporal-java-samples" + + fossa: + build: + context: ../../ + dockerfile: ./docker/buildkite/Dockerfile + command: /bin/sh + environment: + - BUILDKITE_BRANCH + - FOSSA_API_KEY + volumes: + - "../../:/temporal-java-samples"