SERVER-110489: use github_commit expansion and cd into 10gen/mongo to get commit datetime (#41056)

GitOrigin-RevId: d433b42be0531d12228e5705ffe6a4483b14c979
This commit is contained in:
Evan Fetsko 2025-09-09 10:25:35 -04:00 committed by MongoDB Bot
parent b455e2a7bf
commit d1ba05883c
4 changed files with 15 additions and 2 deletions

2
.github/CODEOWNERS vendored
View File

@ -347,6 +347,8 @@ WORKSPACE.bazel @10gen/devprod-build @svc-auto-approve-bot
/evergreen/packager_crypt_py_run.sh @10gen/devprod-build @svc-auto-approve-bot
/evergreen/perf-submission.sh @10gen/devprod-performance-analysis @svc-auto-approve-bot
/evergreen/streams* @10gen/streams-engine @svc-auto-approve-bot
/evergreen/generate_sast_report.sh @10gen/devprod-release-infrastructure @svc-auto-approve-bot
/evergreen/write_sast_report_env_file.sh @10gen/devprod-release-infrastructure @svc-auto-approve-bot
# The following patterns are parsed from ./jstests/OWNERS.yml
/jstests/README.md @10gen/devprod-correctness @svc-auto-approve-bot

View File

@ -33,6 +33,7 @@ tasks:
env:
WORK_DIR: ${workdir}
MODULE_PATH: ${workdir}/devprodCoveritySrc/devprod_coverity
GITHUB_COMMIT: ${github_commit}
TRIGGERED_BY_GIT_TAG: ${triggered_by_git_tag}
MONGODB_VERSION: ${version}
MONGODB_RELEASE_BRANCH: ${branch_name}

View File

@ -42,3 +42,9 @@ filters:
- "streams*":
approvers:
- 10gen/streams-engine
- "generate_sast_report.sh":
approvers:
- 10gen/devprod-release-infrastructure
- "write_sast_report_env_file.sh":
approvers:
- 10gen/devprod-release-infrastructure

View File

@ -1,10 +1,14 @@
#!/bin/env bash
set -eux
# get the datetime for the current commit SHA
cd ${WORK_DIR}/src
commit_datetime=$(git show -s --format=%cd --date=iso-strict ${GITHUB_COMMIT})
echo "Date and time of commit: $commit_datetime"
# generate the SAST report
cd ${MODULE_PATH}/scripts
echo "Running SAST report generation script..."
commit_datetime=$(git log -1 --format=%cd --date=iso-strict)
echo "Date and time of commit: $commit_datetime"
virtualenv -p python3.12 .venv
source .venv/bin/activate
pip install -r sast_reporting/requirements.txt