diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..7e5abc58 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,23 @@ +check-commits: + stage: test + image: registry.gitlab.com/kernel-firmware/linux-firmware + script: + - ci-fairy check-commits --signed-off-by + +pre-commit: + stage: test + image: registry.gitlab.com/kernel-firmware/linux-firmware + script: + - pre-commit run --all-files + +release: + stage: deploy + rules: + - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME + when: never + - if: $RELEASE_TOKEN + script: + - CI_PUSH_REPO=`echo "$CI_REPOSITORY_URL" | sed 's/^.*@/@/g'` + - git remote set-url --push origin "https://gitlab-ci-token:${RELEASE_TOKEN}$CI_PUSH_REPO" + - git tag `date "+%Y%m%d"` + - git push --tags diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..9350dc71 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +# Leverage FDO CI fairy, but add pre-commit to it +FROM quay.io/freedesktop.org/ci-templates:ci-fairy-sha256-eb20531b68e57da06f4e631402fd494869b1529e2c4ad05cfe24ef3fb8038815 +RUN apk add python3-dev +RUN apk add gcc +RUN apk add musl-dev +RUN apk add git +RUN apk add npm +RUN apk add rdfind +RUN apk add shellcheck +RUN pip install pre-commit --ignore-installed distlib diff --git a/check_whence.py b/check_whence.py index 884e8d0c..db6ac0f5 100755 --- a/check_whence.py +++ b/check_whence.py @@ -74,6 +74,7 @@ def main(): [ ".gitignore", ".codespell.cfg", + ".gitlab-ci.yml", ".pre-commit-config.yaml", "check_whence.py", "configure", @@ -81,6 +82,7 @@ def main(): "README.md", "copy-firmware.sh", "WHENCE", + "Dockerfile", ] ) known_prefixes = set(name for name in whence_list if name.endswith("/"))