Pipery ArgoCD CD#
- Repository:
pipery-argocd-cd - Release tag:
v1.1.0 - Catalog: /catalog/
Reusable GitHub Action for ArgoCD deployment with structured logging via Pipery.
Table of Contents#
- Quick Start
- Pipeline Overview
- Configuration Options
- Usage Examples
- GitLab CI
- Bitbucket Pipelines
- About Pipery
- Development
Quick Start#
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pipery-dev/argocd-cd@v1.1.0
with:
argocd_server: argocd.example.com
argocd_app: my-app
image_tag: ${{ github.sha }}
argocd_token: ${{ secrets.ARGOCD_TOKEN }}Pipeline Overview#
| Step | Description | Skip Input |
|---|---|---|
| Update | Update image tag in manifests | skip_update |
| Sync | ArgoCD sync application | skip_sync |
| Status check | Wait for application rollout | skip_status_check |
Configuration Options#
| Name | Default | Description |
|---|---|---|
project_path | . | Path to the project source tree. |
config_file | .pipery/config.yaml | Path to Pipery config file. |
argocd_server | `` | ArgoCD server URL (e.g., argocd.example.com). |
argocd_app | `` | ArgoCD application name. |
argocd_token | `` | ArgoCD authentication token. |
image_name | `` | Container image name to update in ArgoCD. |
image_tag | ${{ github.sha }} | Container image tag to deploy. |
sync_timeout | 300 | Seconds to wait for ArgoCD sync. |
prune | false | Prune resources during sync. |
force | false | Force sync even if app is in sync. |
log_file | pipery.jsonl | Path to write the JSONL log file. |
skip_update | false | Skip image tag update step. |
skip_sync | false | Skip ArgoCD sync step. |
skip_status_check | false | Skip rollout status check. |
Usage Examples#
Example 1: Basic ArgoCD deployment#
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pipery-dev/argocd-cd@v1.1.0
with:
argocd_server: ${{ vars.ARGOCD_SERVER }}
argocd_app: my-app
image_tag: ${{ github.sha }}
argocd_token: ${{ secrets.ARGOCD_TOKEN }}Example 2: With image name update#
- uses: pipery-dev/argocd-cd@v1.1.0
with:
argocd_server: argocd.example.com
argocd_app: my-app
image_name: my-app
image_tag: ${{ github.sha }}
argocd_token: ${{ secrets.ARGOCD_TOKEN }}Example 3: Force sync with resource pruning#
- uses: pipery-dev/argocd-cd@v1.1.0
with:
argocd_server: argocd.example.com
argocd_app: my-app
image_tag: ${{ github.sha }}
force: true
prune: true
argocd_token: ${{ secrets.ARGOCD_TOKEN }}Example 4: Extended sync timeout#
- uses: pipery-dev/argocd-cd@v1.1.0
with:
argocd_server: argocd.example.com
argocd_app: my-app
image_tag: ${{ github.sha }}
sync_timeout: "600"
argocd_token: ${{ secrets.ARGOCD_TOKEN }}Example 5: Skip status checks for faster deployment#
- uses: pipery-dev/argocd-cd@v1.1.0
with:
argocd_server: argocd.example.com
argocd_app: my-app
image_tag: ${{ github.sha }}
skip_status_check: true
argocd_token: ${{ secrets.ARGOCD_TOKEN }}Example 6: Production deployment with release tag#
- uses: pipery-dev/argocd-cd@v1.1.0
with:
argocd_server: argocd.example.com
argocd_app: my-app-prod
image_name: my-app
image_tag: v${{ github.ref_name }}
argocd_token: ${{ secrets.ARGOCD_TOKEN }}GitLab CI#
Use the GitLab mirror template when .gitlab-ci.yml is published for this pipeline family. Import it from the mirrored GitLab project or use it as a reference implementation for running the same Pipery pipeline outside GitHub Actions.
The GitLab pipeline maps action inputs to CI/CD variables, publishes pipery.jsonl as an artifact, and maintains the same skip controls. Store credentials as protected GitLab CI/CD variables.
include:
- project: pipery-dev/argocd-cd
ref: v1.1.0
file: /.gitlab-ci.ymlGitLab CI Variables#
Configure these protected variables in Settings > CI/CD > Variables:
ARGOCD_TOKEN- ArgoCD authentication tokenARGOCD_SERVER- ArgoCD server URL (e.g., argocd.example.com)ARGOCD_APP- ArgoCD application name
Bitbucket Pipelines#
Bitbucket Cloud pipelines provide an alternative to GitHub Actions. Use Bitbucket shared pipeline imports to reference the exported Pipery pipeline instead of copying YAML into every application repository.
Getting Started#
- Add a Bitbucket import source for the shared Pipery pipeline and import the exported pipeline by name:
definitions:
imports:
pipery-shared: pipery-dev/argocd-cd:v1.1.0
pipery-custom: pipery-dev/argocd-cd:v1.1.0:.bitbucket/shared-pipelines.yml
pipelines:
branches:
main:
import: pipery-argocd-cd@pipery-shared
custom:
run-pipery:
import: pipery-argocd-cd@pipery-customUse {project-path}/{repo-slug}:{branch-or-tag} for a shared repository bitbucket-pipelines.yml, or {project-path}/{repo-slug}:{branch-or-tag}:{config-filepath} for another exported YAML file.
- Configure Protected Variables in Repository Settings > Pipelines > Repository Variables:
ARGOCD_TOKEN- ArgoCD authentication tokenARGOCD_SERVER- ArgoCD server URLARGOCD_APP- ArgoCD application name
- Commit to trigger deployment
Pipeline Stages#
The Bitbucket equivalent follows the same structure:
checkout → setup → update → sync → status_check → logs
Features#
- Manifest image tag updates
- ArgoCD application sync
- Automatic rollout monitoring
- Resource pruning support
- Custom sync timeouts
- Health checks
- JSONL-based pipeline logging
- 90-day log retention
About Pipery#
Pipery is an open-source CI/CD observability platform. Every step script runs under psh (Pipery Shell), which intercepts all commands and emits structured JSONL events — giving you full visibility into your pipeline without any manual instrumentation.
- Browse logs in the Pipery Dashboard
- Find all Pipery actions on GitHub Marketplace
- Source code: pipery-dev
Development#
# Run the action locally against test-project/
pipery-actions test --repo .
# Regenerate docs
pipery-actions docs --repo .
# Dry-run release
pipery-actions release --repo . --dry-run