1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-23 06:08:46 +00:00
catalog/task/argocd-task-connect-repo/0.1
Quan Zhang e294e1246b [TEP-0110] Update Tekton Catalog installation instructions
Prior to this change, the installation instructions directly use the resource urls in the Catalog repo, which results in tight coupling between the organization and how users fetch resources (as described in TEP-0110). This commit updates the installation guide to install Tekton Catalog resources via Tekton Hub Api: https://github.com/tektoncd/hub/pull/539

This change decouples the Tekton Catalog organization from resouces resolution, which enables Tekton Catalog reorganization.
2022-08-16 16:25:52 +01:00
..
argocd-task-connect-repo.yaml Add task to connect a repository to an ArgoCD server 2022-06-14 16:05:02 +01:00
README.md [TEP-0110] Update Tekton Catalog installation instructions 2022-08-16 16:25:52 +01:00

ArgoCD

This task connects a repository to Argo CD. To do so, it requires the address of the Argo CD server and some form of authentication either a username/password or an authentication token, as well as the desired repo.

Install the Task

kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/argocd-task-connect-repo/0.1/raw

Parameters

  • repository-url: Name of the application to sync e.g. https://charts.bitnami.com/bitnami

  • repository-name: The name you want to give to the repo, e.g. bitnami

  • flags: Flags to append after commands, e.g. --insecure (default: --)

Platforms

The Task can be run on linux/amd64 platform.

Usage

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-env-configmap
  namespace: argocd
data:
  ARGOCD_SERVER: <Argo CD server address>
---
apiVersion: v1
kind: Secret
metadata:
  name: argocd-env-secret
  namespace: argocd
data:
  # choose one of username/password or auth token
  ARGOCD_USERNAME: <username>
  ARGOCD_PASSWORD: <password>
  ARGOCD_AUTH_TOKEN: <token>
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
  name: argocd-pipeline-test
  namespace: argocd
spec:
  tasks:
    - name: connect-repo
      taskRef:
        name: argocd-task-connect-repo
      params:
        - name: repository-url
          value: https://charts.bitnami.com/bitnami
        - name: repository-type
          value: helm
        - name: repository-name
          value: concourse
        - name: flags
          value: --insecure

For the Secret, choose one of username/password or auth token for logging in. Either of the following are acceptable:

data:
  ARGOCD_USERNAME: <username>
  ARGOCD_PASSWORD: <password>
data:
  ARGOCD_AUTH_TOKEN: <token>