mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-25 06:17:50 +00:00
328b67800f
Starting from 0.7.0, the later is not supported anymore. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
41 lines
1.3 KiB
YAML
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)
|