1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-26 08:26:08 +02:00
infrastructure/.gitlab-ci.yml

28 lines
1019 B
YAML
Raw Normal View History

2020-05-10 01:14:04 +02:00
image: "archlinux:latest"
ansible-lint:
before_script:
- pacman -Syu --needed --noconfirm ansible-lint ansible python-jmespath
2020-05-10 01:14:04 +02:00
script:
2020-05-10 02:25:07 +02:00
# Fix weird ansible bug: https://github.com/trailofbits/algo/issues/1637
2020-05-10 02:20:26 +02:00
# This probably happens due to gitlab-runner mounting the git repo into the container
2020-05-10 01:14:04 +02:00
- chmod o-w .
# Fix syntax-check rule (https://github.com/ansible-community/ansible-lint/issues/1350#issuecomment-778764110)
- sed -i "/^vault_identity_list/d" ansible.cfg
- sed -i -e "/vars_files:/d" -e "/misc\/vaults\/vault_/d" playbooks/*.yml
# Fix load-failure: Failed to load or parse file
- ansible-lint $(printf -- "--exclude %s " */*/vault_*)
2020-05-10 02:36:58 +02:00
terraform-validate:
before_script:
- pacman -Syu --needed --noconfirm terraform diffutils
2020-05-10 02:36:58 +02:00
script:
- cd tf-stage1
- terraform init -backend=false
- terraform validate
- terraform fmt --check
2020-05-10 02:36:58 +02:00
- cd ../tf-stage2
- terraform init -backend=false
- terraform validate
- terraform fmt --check --diff