commit 08f7f6133a5ec1484002b981a2a6488991c03e5a Author: Lauri Võsandi Date: Wed Aug 3 13:53:51 2022 +0300 Initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..c8aeced --- /dev/null +++ b/.drone.yml @@ -0,0 +1,16 @@ +kind: pipeline +type: kubernetes +name: default + +steps: +- name: docker + image: plugins/docker + settings: + repo: harbor.k-space.ee/${DRONE_REPO} + registry: harbor.k-space.ee + mtu: 1300 + storage_driver: vfs + username: + from_secret: docker_username + password: + from_secret: docker_password diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..06b2160 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3-alpine +RUN apk add git +RUN pip install gitlint +ADD gitlint.ini /config/gitlint.ini +WORKDIR /apps +ENTRYPOINT ["gitlint", "--config", "/config/gitlint.ini"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..2c9c0df --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# gitlint bundle + +This is what we use in the CI/CD pipelines, to run locally use: + +``` +docker run -it --rm --user $UID -v $PWD:/apps harbor.k-space.ee/k-space/gitlint-bundle +``` + +General tips on how to format commit messages https://github.com/knowbl/git-commit-message#the-seven-rules diff --git a/gitlint.ini b/gitlint.ini new file mode 100644 index 0000000..cb20153 --- /dev/null +++ b/gitlint.ini @@ -0,0 +1,15 @@ +[general] +ignore=body-is-missing +ignore-stdin=true + +[title-match-regex] +# Commit title is a sentence and it starts with capital letter +regex=[A-Z] + +[author-valid-email] +# Must use username@k-space.ee for commits +regex=[^@]+@k-space.ee + +[title-must-not-contain-word] +# Use imperative mood for commit title +words=adding,added,enabling,enabled,disabling,disabled,updating,updated,bumping,bumped,making,refactoring,refactored,starting,started