Skip to content

Commit

Permalink
chore(ci): create static analysis report as part of CI COMPASS-7909 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Jun 10, 2024
1 parent a0ad35d commit 07f69c5
Show file tree
Hide file tree
Showing 6 changed files with 319 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .evergreen/connectivity-tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# "bullseye" is the debian distribution that ubuntu:20.04 is based on
FROM node:16-bullseye
FROM node:18-bullseye

COPY .evergreen/connectivity-tests/krb5.conf /etc/krb5.conf

Expand All @@ -19,7 +19,7 @@ ENV COMPASS_RUN_DOCKER_TESTS="true"
COPY . /compass-monorepo-root
WORKDIR /compass-monorepo-root

RUN npm i -g npm@8
RUN npm i -g npm@10.2.4
RUN npm run bootstrap-ci

CMD ["bash", ".evergreen/connectivity-tests/entrypoint.sh"]
6 changes: 6 additions & 0 deletions .evergreen/create-static-analysis-report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -e
set -x

npm run create-static-analysis-report
(cd .sbom && tar czvf ../static-analysis-report.tgz codeql.md codeql.sarif.json)
22 changes: 22 additions & 0 deletions .evergreen/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,21 @@ functions:
set -e
.evergreen/create-sbom.sh
- command: shell.exec
params:
working_dir: src
shell: bash
env:
<<: *compass-env
DEBUG: ${debug}
npm_config_loglevel: ${npm_loglevel}
GITHUB_TOKEN: ${devtoolsbot_github_token}
GITHUB_PR_NUMBER: ${github_pr_number}
script: |
set -e
# Load environment variables
eval $(.evergreen/print-compass-env.sh)
.evergreen/create-static-analysis-report.sh
publish:
- command: shell.exec
Expand Down Expand Up @@ -785,6 +800,13 @@ functions:
remote_file: ${project}/${revision}_${revision_order_id}/${task_id}/sbom.json
content_type: application/json
optional: true
- command: s3.put
params:
<<: *save-artifact-params-private
local_file: src/static-analysis-report.tgz
remote_file: ${project}/${revision}_${revision_order_id}/${task_id}/static-analysis-report.tgz
content_type: application/x-gzip
optional: true

get-all-artifacts:
- command: shell.exec
Expand Down
Loading

0 comments on commit 07f69c5

Please sign in to comment.