Skip to content
Snippets Groups Projects

Resolve "Configure gitlab-ci"

Merged wallun requested to merge 1-configure-gitlab-ci into main
+ 37
0
---
variables:
container_registry: docker.io
image_name: archlinux
image_version: latest
stages:
- test
- doc
pre-commit:
stage: test
image: ${container_registry}/${image_name}:${image_version}
before_script:
- pacman -Syu --noconfirm
- pacman -S git --noconfirm
- pacman -S pre-commit --noconfirm
- pacman -S sudo --noconfirm
- pacman -S base-devel --noconfirm
- useradd -G wheel aur_builder
- echo "aur_builder ALL=(ALL) NOPASSWD:ALL" |
tee /etc/sudoers.d/aur_builder
- sudo -u aur_builder git clone https://aur.archlinux.org/gitlint
/tmp/gitlint
- pushd /tmp/gitlint
- sudo -u aur_builder makepkg -si --noconfirm
- popd
- git config --global user.name "${GITLAB_USER_LOGIN}"
- git config --global user.email "${GITLAB_USER_EMAIL}"
script:
- pre-commit install -t pre-commit
- pre-commit install -t commit-msg
- git log -1 --format=%B > /tmp/COMMIT_MSG
- pre-commit run gitlint
--hook-stage commit-msg
--commit-msg-filename /tmp/COMMIT_MSG
- pre-commit run --all --verbose
Loading