AAP 2.6 CI/CD Pipeline Integration: GitOps Workflows with Jenkins, GitLab, and GitHub Actions
By Luca Berton · Published 2024-01-01 · Category: installation
Integrate AAP 2.6 into CI/CD pipelines with Jenkins, GitLab CI, and GitHub Actions. GitOps workflows, webhook triggers, Infrastructure as Code testing, approval gates, and automated deployment patterns.
CI/CD with AAP 2.6
AAP 2.6 fits into CI/CD pipelines in two ways: as a target (pipelines trigger AAP jobs) and as an orchestrator (AAP workflows drive the full deployment). Most enterprises use both — CI builds and tests in the pipeline, then hands off to AAP for infrastructure deployment.
Integration Patterns
| Pattern | How It Works | Best For | |---------|-------------|----------| | Webhook trigger | Git push → AAP launches job | Simple GitOps | | API trigger | Pipeline calls AAP REST API | Full pipeline control | | Pipeline plugin | Native Jenkins/GitLab plugin | Tight integration | | Hybrid | Pipeline builds → AAP deploys | Separation of concerns |
GitHub Actions
Trigger AAP Job from GitHub Actions
AAP Webhook Receiver
Configure the job template to accept GitHub webhooks directly:
GitHub webhook URL: https://gateway.example.org/api/controller/v2/job_templates/
GitLab CI
GitLab Pipeline
Jenkins
Jenkins Pipeline
GitOps Workflow Pattern
AAP Workflow for Full GitOps
Best Practices
Credential Management
Idempotent Deployments
FAQ
Should the CI pipeline or AAP own the deployment?
Use CI for building, testing, and artifact creation. Use AAP for infrastructure deployment. AAP provides RBAC, credential injection, audit logging, and rollback that CI tools lack.
How do I handle rollbacks?
Configure an AAP workflow with a rollback path. On job failure, the workflow triggers a rollback job template that deploys the previous known-good version. Store version history in AAP survey variables or external CMDB.
Can I use AAP Collections in CI pipelines?
Yes. Install ansible.controller or ansible.platform in your pipeline and use the collection modules to interact with AAP programmatically — launching jobs, creating inventories, managing credentials.
How do I test Ansible playbooks in CI?
Use Molecule for role-level testing, ansible-navigator run --check for syntax/dry-run validation, and ansible-lint for style checks. Run integration tests against ephemeral infrastructure in staging before production.
What about branch-based deployments?
Use AAP project branches — set the SCM branch dynamically via extra_vars or survey. Feature branches deploy to dev environments, main deploys to staging/production.
Conclusion
AAP 2.6 integrates seamlessly into CI/CD pipelines through webhooks, REST API, and native plugins. Whether using GitHub Actions, GitLab CI, or Jenkins, the pattern is consistent: CI handles build and test, AAP handles deployment with enterprise controls. GitOps workflows combine both for fully automated, auditable infrastructure delivery.
Related Articles • AAP 2.6 REST API Guide: Automate the Automation Platform • AAP 2.6 Workflow Templates: Advanced Multi-Step Automation Guide • AAP 2.6 Notifications and Webhooks: Slack, Teams, Email, and Custom Integrations • Ansible GitOps Infrastructure as Code with Git Workflows and AAP • AAP 2.6 Credential Management: Vaults, External Secrets, and Machine Credentials
Category: installation