cluster.fun/tekton/tasks/make.yaml

49 lines
1.1 KiB
YAML

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: make
namespace: tekton-pipelines
spec:
params:
- name: TARGET
description: The make target to run
- name: REPO
description: The name of the repo
- name: PR_ID
description: The ID of the pull request
- name: SHA
description: The commit sha
resources:
inputs:
- name: src
type: git
steps:
- name: make
workingDir: /workspace/src
image: docker.cluster.fun/averagemarcus/ci-builder:latest
script: |
make --dry-run $(params.TARGET) &> /dev/null || (echo "No '$(params.TARGET)' target found, skipping" && exit 0)
make $(params.TARGET)
env:
- name: REPO
value: $(params.REPO)
- name: PR_ID
value: $(params.PR_ID)
- name: SHA
value: $(params.SHA)
- name: ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: gitea-access-token
key: access-token
- name: KUBECONFIG
value: /root/.kube/config
volumeMounts:
- name: kubeconfig
mountPath: /root/.kube/config
subPath: config
volumes:
- name: kubeconfig
secret:
secretName: kubeconfig