diff options
author | Josh Boyer <jwboyer@redhat.com> | 2023-08-31 13:39:48 +0000 |
---|---|---|
committer | Josh Boyer <jwboyer@redhat.com> | 2023-08-31 13:39:48 +0000 |
commit | 61501389c43b6bb9b1fbb104c4ac79e7af03fcdc (patch) | |
tree | a474e2260cf7c9ab830b2806923d3f5aa0edd37d | |
parent | 5ebb5914a3b95be1dab4f058d073bd75afcdd0f2 (diff) | |
parent | b2f03c845a210dc9f8ef48c0db761e3e02575eec (diff) | |
download | linux-firmware-61501389c43b6bb9b1fbb104c4ac79e7af03fcdc.tar.gz |
Merge branch 'mlimonci/enable-pre-commit-ci' into 'main'
Enable CI jobs for merge requests
See merge request kernel-firmware/linux-firmware!3
-rw-r--r-- | .gitlab-ci.yml | 23 | ||||
-rw-r--r-- | Dockerfile | 10 | ||||
-rwxr-xr-x | check_whence.py | 2 |
3 files changed, 35 insertions, 0 deletions
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("/")) |