mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-22 21:34:48 +07:00
ci: prepare for workflow rewrite
This commit is contained in:
parent
3b7e8f1688
commit
2d022ad114
@ -6,7 +6,6 @@ spec:
|
||||
workspaces:
|
||||
- name: shared-data
|
||||
tasks:
|
||||
|
||||
- name: git-clone
|
||||
taskRef:
|
||||
name: git-clone
|
||||
@ -18,30 +17,7 @@ spec:
|
||||
value: http://gitea-http.gitea:3000/ops/homelab
|
||||
- name: revision
|
||||
value: master
|
||||
|
||||
- name: tools
|
||||
runAfter:
|
||||
- git-clone
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: shared-data
|
||||
# TODO secure registry
|
||||
# - 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: pre-commit
|
||||
runAfter:
|
||||
- tools
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: shared-data
|
||||
@ -49,49 +25,15 @@ spec:
|
||||
workspaces:
|
||||
- name: source
|
||||
stepTemplate:
|
||||
image: registry.khuedoan.com/tools:latest
|
||||
image: nixos/nix:latest
|
||||
workingDir: /workspace/source
|
||||
steps:
|
||||
- name: run
|
||||
command:
|
||||
- pre-commit
|
||||
- nix-shell
|
||||
- --command
|
||||
args:
|
||||
- run
|
||||
# - --all-files
|
||||
- --color=always
|
||||
|
||||
- name: external
|
||||
runAfter:
|
||||
- pre-commit
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: shared-data
|
||||
taskSpec:
|
||||
workspaces:
|
||||
- name: source
|
||||
volumes:
|
||||
- name: terraform-secrets
|
||||
secret:
|
||||
secretName: terraform-secrets
|
||||
stepTemplate:
|
||||
image: registry.khuedoan.com/tools:latest
|
||||
workingDir: /workspace/source/external
|
||||
volumeMounts:
|
||||
- name: terraform-secrets
|
||||
mountPath: /root/.terraform.d/credentials.tfrc.json
|
||||
subPath: credentials.tfrc.json
|
||||
- name: terraform-secrets
|
||||
mountPath: /workspace/source/external/terraform.tfvars
|
||||
subPath: terraform.tfvars
|
||||
command:
|
||||
- make
|
||||
steps:
|
||||
- name: plan
|
||||
args:
|
||||
- plan
|
||||
- name: apply
|
||||
args:
|
||||
- apply
|
||||
- "pre-commit run --color=always"
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
|
Loading…
Reference in New Issue
Block a user