You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.5 KiB
73 lines
1.5 KiB
2 years ago
|
apiVersion: tekton.dev/v1beta1
|
||
|
kind: Pipeline
|
||
|
metadata:
|
||
|
name: fetch-code-pre-do
|
||
|
spec:
|
||
|
description: |
|
||
|
fetch code and check vet .etc...
|
||
|
params:
|
||
|
- name: repo-url
|
||
|
type: string
|
||
|
description: The git repository URL to clone from.
|
||
|
- name: branch-name
|
||
|
type: string
|
||
|
description: The git branch to clone.
|
||
|
- name: version
|
||
|
type: string
|
||
|
description: version
|
||
|
workspaces:
|
||
|
- name: shared-data
|
||
|
description: |
|
||
|
save code
|
||
|
tasks:
|
||
|
- name: fetch-repo
|
||
|
taskRef:
|
||
|
name: git-clone
|
||
|
workspaces:
|
||
|
- name: output
|
||
|
workspace: shared-data
|
||
|
params:
|
||
|
- name: url
|
||
|
value: $(params.repo-url)
|
||
|
- name: revision
|
||
|
value: $(params.branch-name)
|
||
|
- name: pre-do
|
||
|
runAfter: ["fetch-repo"] # Wait until the clone is done before reading the readme.
|
||
|
workspaces:
|
||
|
- name: source
|
||
|
workspace: shared-data
|
||
|
taskRef:
|
||
|
name: pre-do
|
||
|
params:
|
||
|
- name: version
|
||
|
value: $(params.version)
|
||
|
|
||
|
---
|
||
|
apiVersion: tekton.dev/v1beta1
|
||
|
kind: PipelineRun
|
||
|
metadata:
|
||
|
name: fetch-code-pre-do
|
||
|
spec:
|
||
|
serviceAccountName: build-bot
|
||
|
pipelineRef:
|
||
|
name: fetch-code-pre-do
|
||
|
podTemplate:
|
||
|
securityContext:
|
||
|
fsGroup: 65532
|
||
|
workspaces:
|
||
|
- name: shared-data
|
||
|
volumeClaimTemplate:
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 1Gi
|
||
|
params:
|
||
|
- name: repo-url
|
||
|
value: git@host.docker.internal:root/mashibing-deployment.git
|
||
|
- name: branch-name
|
||
|
value: master
|
||
|
- name: version
|
||
|
value: "v0.0.1"
|