# Tekton Task Library Reusable Tekton Tasks for common CI/CD operations across the mk-labs homelab. --- ## Overview Tasks are the building blocks of Tekton Pipelines. Each task defines a series of steps that execute in sequence within a container. **Key characteristics:** - Parameterized for flexibility - Work with workspaces for file I/O - Can be referenced by multiple pipelines - Deployed to `innoventions` namespace but usable across the cluster --- ## Available Tasks ### git-clone.yaml Clone a Git repository from Gitea. **Parameters:** - `url` - Git repository URL (e.g., https://gitea.mk-labs.cloud/rblundon/my-app.git) - `revision` - Branch, tag, or commit SHA (default: main) - `subdirectory` - Clone into subdirectory (default: "") **Workspaces:** - `output` - Where the repository will be cloned **Usage:** ```yaml tasks: - name: fetch-source taskRef: name: git-clone params: - name: url value: https://gitea.mk-labs.cloud/rblundon/my-app.git - name: revision value: main workspaces: - name: output workspace: shared-workspace ``` --- ### kaniko-build.yaml Build and push a container image using Kaniko (rootless builds). **Parameters:** - `image` - Full image name including tag (e.g., the-seas.local.mk-labs.cloud/library/app:v1.0) - `context` - Build context directory relative to workspace (default: .) - `dockerfile` - Path to Dockerfile (default: ./Dockerfile) **Workspaces:** - `source` - Source code containing Dockerfile **Secrets Required:** - `harbor-credentials` - Docker config JSON for Harbor authentication **Usage:** ```yaml tasks: - name: build-image taskRef: name: kaniko-build params: - name: image value: the-seas.local.mk-labs.cloud/library/my-app:v1.0 - name: dockerfile value: ./Dockerfile workspaces: - name: source workspace: shared-workspace ``` --- ## Testing Tasks Standalone Each task can be tested independently before integrating into pipelines. **Example: Test git-clone** 1. Create test workspace: ```bash kubectl apply -f - <