mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-23 01:04:32 +07:00
70 lines
1.6 KiB
YAML
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"
|