Creates Argo CD resources in a specified namespace from a given repository and path.
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| path | string | - | |
| appName | string | - | |
| repoUrl | string | - | |
| namespace | string | - | |
| labelValue | string | - | |
| projectName | string | - | |
| argoInstance | string | - |
Output Schema
Usage Examples
Create a dev application from a shared configs repo
Creates Argo CD resources for a service in the dev namespace using a shared configurations repository. Use this when your app manifests live in a central repo with environment overlays.
steps:
- id: fetch-base
action: fetch:template
input:
url: ./skeleton
values:
serviceName: ${{ parameters.serviceName }}
- id: argocd-dev-app
action: argocd:create-resources
input:
appName: ${{ parameters.serviceName }}-dev
argoInstance: main
namespace: dev
repoUrl: https://github.com/acme/app-configs.git
path: apps/${{ parameters.serviceName }}/overlays/devAssign to an Argo project and apply a label value
Creates resources for a staging environment and assigns the application to a specific Argo CD project. Use this to group apps by team or domain and tag them with a label value.
steps:
- id: fetch-skeleton
action: fetch:template
input:
url: ./template
values:
serviceName: payments-api
- id: argocd-staging-app
action: argocd:create-resources
input:
appName: payments-api-staging
argoInstance: staging
namespace: staging
repoUrl: https://github.com/acme/payments-api.git
path: deploy/overlays/staging
projectName: payments
labelValue: paymentsParameterized environment deployment
Parameters drive the environment, app name, and path to manifests. Use this when the same template should work for dev, staging, or prod.
steps:
- id: fetch-template
action: fetch:template
input:
url: ./skeleton
values:
serviceName: ${{ parameters.serviceName }}
environment: ${{ parameters.environment }}
- id: argocd-create
action: argocd:create-resources
input:
appName: ${{ parameters.serviceName }}-${{ parameters.environment }}
argoInstance: ${{ parameters.argoInstance }}
namespace: ${{ parameters.environment }}
repoUrl: ${{ parameters.repoUrl }}
path: deploy/overlays/${{ parameters.environment }}Create a prod application from a monorepo path
Points Argo CD to a monorepo path for the service manifests. Use this when multiple services store manifests in a single repository.
steps:
- id: fetch
action: fetch:template
input:
url: ./skeleton
values:
serviceName: orders-api
- id: argocd-prod-app
action: argocd:create-resources
input:
appName: orders-api-prod
argoInstance: argo-prod
namespace: prod
repoUrl: https://github.com/acme/infra-manifests.git
path: services/orders-api/overlays/prod
projectName: platformCreate a preview application per pull request
Creates a temporary Argo CD app for a pull request in a preview namespace. Use this to spin up short-lived environments for reviews.
steps:
- id: fetch
action: fetch:template
input:
url: ./skeleton
values:
serviceName: ${{ parameters.serviceName }}
prNumber: ${{ parameters.prNumber }}
- id: argocd-preview-app
action: argocd:create-resources
input:
appName: ${{ parameters.serviceName }}-pr-${{ parameters.prNumber }}
argoInstance: preview
namespace: pr-${{ parameters.prNumber }}
repoUrl: https://github.com/acme/${{ parameters.serviceName }}.git
path: deploy/overlays/preview
labelValue: pr-${{ parameters.prNumber }}