1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-25 06:17:50 +00:00
catalog/argocd/argocd.yaml
Vincent Demeester 328b67800f Update templating to use $(…) instead of ${…}
Starting from 0.7.0, the later is not supported anymore.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2019-09-24 08:36:12 -05:00

41 lines
1.3 KiB
YAML

apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: argocd-task-sync-and-wait
spec:
inputs:
params:
- name: application-name
description: name of the application to sync
- name: revision
description: the revision to sync to
default: HEAD
- name: flags
default: --
- name: argocd-version
default: v1.0.2
stepTemplate:
envFrom:
- configMapRef:
name: argocd-env-configmap # used for server address
- secretRef:
name: argocd-env-secret # used for authentication (username/password or auth token)
steps:
- name: login
image: argoproj/argocd:$(inputs.params.argocd-version)
command: ["/bin/bash", "-c"]
args:
- if [ -z $ARGOCD_AUTH_TOKEN ]; then
yes | argocd login $ARGOCD_SERVER --username=$ARGOCD_USERNAME --password=$ARGOCD_PASSWORD;
fi
- name: sync
image: argoproj/argocd:$(inputs.params.argocd-version)
command: ["/bin/bash", "-c"]
args:
- argocd app sync $(inputs.params.application-name) --revision $(inputs.params.revision) $(inputs.params.flags)
- name: wait
image: argoproj/argocd:$(inputs.params.argocd-version)
command: ["/bin/bash", "-c"]
args:
- argocd app wait $(inputs.params.application-name) --health $(inputs.params.flags)