mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: add sbom validation using pre-commit's post-commit stage
With 09ba070b7e7a ("fix: allow to use older pre-commit hook version") and b93cc581a5d6 ("fix: set default pre-commit hook stages to pre-commit..") we set the default pre-commit hook stage to commit/pre-commit, which avoids running the pre-commit plugins/hooks multiple times for different stages. Unfortunately this also affects "pre-commit run" used in CI and now it runs only plugins which are by default using the commit/pre-commit stage. Meaning the sbom validation, which uses post-commit, is not run at all. This adds an explicit pre-commit command for validate-sbom-manifest plugin, which needs to be started in post-commit stage. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
parent
ccc8b274eb
commit
62fd4abded
@ -17,6 +17,7 @@ check_pre_commit_master_release:
|
||||
- .rules:protected
|
||||
script:
|
||||
- git diff-tree --no-commit-id --name-only -r $PIPELINE_COMMIT_SHA | xargs pre-commit run --files
|
||||
- pre-commit run --hook-stage post-commit validate-sbom-manifest
|
||||
|
||||
check_pre_commit_MR:
|
||||
extends:
|
||||
@ -24,6 +25,7 @@ check_pre_commit_MR:
|
||||
- .rules:mr
|
||||
script:
|
||||
- python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | xargs pre-commit run --files
|
||||
- pre-commit run --hook-stage post-commit validate-sbom-manifest
|
||||
|
||||
check_MR_style_dangerjs:
|
||||
extends:
|
||||
|
Loading…
x
Reference in New Issue
Block a user