cluster.fun/tekton/tasks/make.yaml

49 lines
1.1 KiB
YAML
Raw Permalink Normal View History

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