GitLab CI Integration¶
Overview¶
This guide explains how to integrate ARIA with GitLab CI/CD for automated policy validation and deployment.
Pipeline Example¶
image: python:3.8
stages:
- validate
- test
- deploy
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.pip-cache"
cache:
paths:
- .pip-cache/
validate_policies:
stage: validate
script:
- pip install aria-policy
- aria validate policies/
rules:
- changes:
- policies/**/*
- templates/**/*
test_templates:
stage: test
script:
- pip install aria-policy
- aria test-templates templates/
rules:
- changes:
- templates/**/*
deploy_policies:
stage: deploy
script:
- pip install aria-policy
- aria deploy policies/
only:
- main
when: manual
Setup Instructions¶
- Add
.gitlab-ci.yml
- Configure CI/CD variables
- Enable GitLab CI/CD
- Set up runners
Best Practices¶
- Stage organization
- Caching strategy
- Error handling
- Documentation