This commit is contained in:
parent
79bf1ea8f8
commit
73ebf7c14e
3 changed files with 37 additions and 24 deletions
37
.gitea/workflows/ci.yml
Normal file
37
.gitea/workflows/ci.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
terraform:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup Terraform
|
||||||
|
uses: hashicorp/setup-terraform@v2
|
||||||
|
- name: Init
|
||||||
|
run: ./scripts/terraform/terraform.sh init -backend=false
|
||||||
|
- name: Lint
|
||||||
|
run: ./scripts/terraform/lint.sh
|
||||||
|
|
||||||
|
ansible:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.11
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: pip-${{ hashFiles('ansible/dev-requirements.txt') }}
|
||||||
|
|
||||||
|
# HACK: https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
|
||||||
|
- name: Fix permissions
|
||||||
|
run: chmod 0755 ansible/
|
||||||
|
|
||||||
|
- name: Set up
|
||||||
|
run: ./scripts/ansible/setup.sh
|
||||||
|
- name: Pretend executable is vault password
|
||||||
|
run: chmod -x ansible/vault-pass.sh
|
||||||
|
- name: Lint
|
||||||
|
run: ./scripts/ansible/lint.sh
|
|
@ -1,22 +0,0 @@
|
||||||
terraform:
|
|
||||||
image: registry.gitlab.com/gitlab-org/terraform-images/stable:latest
|
|
||||||
before_script:
|
|
||||||
- apk add --no-cache bash
|
|
||||||
- ./scripts/terraform/terraform.sh init -backend=false
|
|
||||||
script:
|
|
||||||
- ./scripts/terraform/lint.sh
|
|
||||||
|
|
||||||
ansible:
|
|
||||||
image: python:3.11-slim
|
|
||||||
variables:
|
|
||||||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
|
||||||
cache:
|
|
||||||
paths:
|
|
||||||
- .cache/pip
|
|
||||||
before_script:
|
|
||||||
- chmod 0755 ansible/ # HACK: https://docs.ansible.com/ansible/devel/reference_appendices/config.html#cfg-in-world-writable-dir
|
|
||||||
- apt-get update && apt-get install -y bash git
|
|
||||||
- ./scripts/ansible/setup.sh
|
|
||||||
- chmod -x ansible/vault-pass.sh # HACK: Pretend executable _is_ the password
|
|
||||||
script:
|
|
||||||
- ./scripts/ansible/lint.sh
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Infrastructure
|
# Infrastructure
|
||||||
|
|
||||||
![CI](https://git.theorangeone.net/sys/infrastructure/badges/master/pipeline.svg)
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Python 3
|
- Python 3
|
||||||
|
|
Loading…
Reference in a new issue