Tekton CI Update
I’ve spent less time working on the Tekton CI project this week, I had a sudden desire to write some 68000 assembly to rekindle some memories from my youth, so things slowed a little.
Some new functionality has landed tho’
Configurability of the PVC
You can now configure the size of the claimed volume from the command-line.
containers:
- name: tekton-ci-http
image: quay.io/bigkevmcd/tekton-ci
command: ["./ci-hook-server"]
args: ["http", "--pipelinerun-volume-size", "3G"]
It’d be trivial to allow configurability of the PVC from a DSL configuration (within limits, and I’ll see if I can find time to do this.
Private Git Repo Access
You can now drive your pipeline runs from a private GitHub repo, it’s looked up
in the GITHUB_TOKEN
environment variable.
Create a secret, and ensure that you reference it in the Deployment with:
$ kubectl create secret generic tekton-ci-client --from-literal=token=GENERATE_ME
env:
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: tekton-ci-client
key: token
Hook ID Annotation
The PipelineRun that’s generated is annotated with the “Hook ID” from the
incoming hook in the tekton.dev/ci-hook-id
.
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
annotations:
tekton.dev/git-status: "true"
tekton.dev/status-context: tekton-ci
tekton.dev/ci-source-ref: refs/pulls/4
tekton.dev/ci-source-url: https://github.com/bigkevmcd/github-tool.git
tekton.dev/ci-hook-id: "26400635-d8f4-4cf5-a45f-bd03856bdf2b"
generateName: my-pipeline-run-
labels:
app.kubernetes.io/managed-by: dsl
app.kubernetes.io/part-of: Tekton-CI
Finally, if you’ve made it this far, I have a working “commit-status” mechanism, that will track the PipelineRun and notify GitHub of the success/failure of your Pipeline, this should land in the next week.