apiVersion: tekton.dev/v1 kind: Task metadata: name: auto-cd-create spec: params: - name: toolbox-image default: sebt3/basic-toolbox-image:1.29.4 description: The name of the toolbox image type: string - name: issuer-name default: letsencrypt-prod type: string - name: domain-name type: string - name: stages type: array - name: artifactory-url description: The url of the current artifactory - name: project-name description: The git repository name - name: project-path description: The path of the current project - name: git-repository-url description: The git repository url - name: deploy-url description: The git repository url for the deploy project steps: - name: create image: $(params.toolbox-image) workingDir: $(workspaces.source.path) args: - $(params.stages) env: - name: ARTIFACTORY_URL value: $(params.artifactory-url) - name: DOMAIN_NAME value: $(params.domain-name) - name: ISSUER_NAME value: $(params.issuer-name) - name: PROJECT_NAME value: $(params.project-name) - name: PROJECT_PATH value: $(params.project-path) - name: GIT_REPOSITORY_URL value: $(params.git-repository-url) - name: DEPLOY_URL value: $(params.deploy-url) - name: TEMPLATE_ROOT value: /etc/templates - name: WORKSPACE_SSH_DIRECTORY_PATH value: $(workspaces.ssh-directory.path) - name: NAMESPACE value: $(context.taskRun.namespace) script: |- #!/usr/bin/env bash . ${TEMPLATE_ROOT}/functions.sh cleanup git_prepare "$(params.deploy-url)" "Auto CD" "autocd@$(params.domain-name)" install_base create_prj "$@" git_push "Adding $(params.project-name)" cleanup volumeMounts: - mountPath: /etc/templates name: templates volumes: - name: templates configMap: name: auto-cd-templates workspaces: - name: source mountPath: /data - description: | A .ssh directory with private key, known_hosts, config, etc. Copied to the user's home before git commands are executed. Used to authenticate with the git remote when performing the clone. Binding a Secret to this Workspace is strongly recommended over other volume types. name: ssh-directory