khuedoan-homelab/.ci/master.yaml
2023-01-26 17:19:43 +07:00

70 lines
1.6 KiB
YAML

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: master
spec:
workspaces:
- name: shared-data
tasks:
- name: clone
taskRef:
resolver: hub
params:
- name: kind
value: task
- name: name
value: git-clone
- name: version
value: "0.7"
workspaces:
- name: output
workspace: shared-data
params:
- name: url
value: $(params.git_url)
- name: revision
value: $(params.git_revision)
- name: tools
runAfter:
- clone
taskRef:
resolver: hub
params:
- name: kind
value: task
- name: name
value: kaniko
- name: version
value: "0.6"
params:
- name: DOCKERFILE
value: ./Dockerfile.tools
- name: IMAGE
value: &toolsImage registry.khuedoan.com/homelab-tools:$(params.git_revision)
- name: EXTRA_ARGS
value:
- --cache=true
workspaces:
- name: source
workspace: shared-data
- name: test
runAfter:
- clone
- tools
workspaces:
- name: source
workspace: shared-data
taskSpec:
workspaces:
- name: source
stepTemplate:
image: *toolsImage
workingDir: $(workspaces.source.path)
steps:
- name: pre-commit
command:
- nix-shell
- --command
args:
- "pre-commit run --color=always"