UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit e18c4648 authored by Zachariah Dzielinski's avatar Zachariah Dzielinski
Browse files

ci: first pass attempt to test commitlint job

parent 76c427b8
No related branches found
No related tags found
No related merge requests found
Pipeline #125884 failed
......@@ -39,6 +39,7 @@ commitlint:
stage: .pre
script:
- npm install --only=dev
- ./scripts/commitlint.sh
pre vars:
image: registry.dsop.io/platform-one/big-bang/pipeline-templates/pipeline-templates/pre-envs:ubi8.3
......
#!/usr/bin/env bash
for sha in $(git log master..$(git rev-parse --abbrev-ref HEAD) --format=format:%H); do
echo $sha
# loop over commit sha's for commits that exist in this branch but not the default branch
for sha in $(git log $CI_DEFAULT_BRANCH..$CI_COMMIT_REF_NAME --format=format:%H); do
# get the commit message from the sha
message=$(git log --format=format:%s -n 1 $sha)
# debug output and lint the commit
echo "Linting commit: $sha - $message"
echo "$message" | npx commitlint
done
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment