21 lines
602 B
YAML
21 lines
602 B
YAML
variables:
|
|
GITLAB_CI_IMAGE_ALPINE: 'alpine:3.9'
|
|
GITLAB_CI_SIGN_OFF_EXCLUDE: '1bd2668566256a8aff8766a48cacb0e107915911'
|
|
stages:
|
|
- static
|
|
|
|
# 'static' stage
|
|
sign_off:
|
|
stage: static
|
|
needs: []
|
|
image: ${GITLAB_CI_IMAGE_ALPINE}
|
|
before_script:
|
|
- apk add --no-cache git
|
|
script: >-
|
|
git log
|
|
--grep "^Signed-off-by: .\+<.\+\(@\| at \).\+\(\.\| dot \).\+>$"
|
|
--invert-grep
|
|
--format="Detected commit '%h' with missing or bad sign-off! Please read 'CONTRIBUTING.md'."
|
|
--exit-code
|
|
"$(rev=$(git rev-parse -q --verify "$GITLAB_CI_SIGN_OFF_EXCLUDE^{commit}") && echo "$rev..")"
|