khuedoan-homelab/.tekton/pipelines/pipeline.yaml
2021-12-27 11:16:10 +07:00

73 lines
1.5 KiB
YAML

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: homelab
spec:
workspaces:
- name: shared-data
tasks:
- name: fetch-repo
taskRef:
name: git-clone
workspaces:
- name: output
workspace: shared-data
params:
- name: url
value: http://gitea-http.gitea:3000/ops/homelab
- name: revision
value: master
- name: lint
runAfter:
- fetch-repo
workspaces:
- name: source
workspace: shared-data
taskRef:
name: lint
- name: tools
runAfter:
- fetch-repo
workspaces:
- name: source
workspace: shared-data
# - name: dockerconfig
# workspace: dockerconfig
taskRef:
name: kaniko
params:
- name: CONTEXT
value: ./tools
- name: IMAGE
value: registry.khuedoan.com/tools:latest
- name: EXTRA_ARGS
value:
- --cache=true
- name: external
runAfter:
- fetch-repo
workspaces:
- name: source
workspace: shared-data
taskRef:
name: terraform-external
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: homelab
spec:
serviceAccountName: terraform-sa
pipelineRef:
name: homelab
workspaces:
- name: shared-data
volumeClaimTemplate:
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi