mirror of
https://github.com/bvanroll/stage-infra.git
synced 2025-08-28 19:42:43 +00:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
---
|
|
apiVersion: tekton.dev/v1beta1
|
|
kind: Pipeline
|
|
metadata:
|
|
name: stage-application-pipeline
|
|
spec:
|
|
params:
|
|
- name: git-repo-name
|
|
description: name of the git repo (used to determine the name of the image)
|
|
- name: git-url
|
|
description: url of the git repository to clone
|
|
- name: branch
|
|
description: name of the master branch of the repository
|
|
workspaces:
|
|
- name: workspace
|
|
tasks:
|
|
- name: clone
|
|
taskRef:
|
|
name: git-clone
|
|
workspaces:
|
|
- name: output
|
|
workspace: workspace
|
|
params:
|
|
- name: url
|
|
value: $(inputs.params.git-url)
|
|
- name: revision
|
|
value: $(inputs.params.branch)
|
|
- name: build-and-push
|
|
taskRef:
|
|
name: build-and-push
|
|
runAfter:
|
|
- clone
|
|
workspaces:
|
|
- name: source
|
|
workspace: workspace
|
|
params:
|
|
- name: context
|
|
value: "src"
|
|
- name: image-name
|
|
value: "$(inputs.params.git-repo-name)"
|
|
- name: version
|
|
value: "$(inputs.params.branch)"
|
|
- name: deploy-app
|
|
taskRef:
|
|
name: deploy-app
|
|
workspaces:
|
|
- name: source
|
|
workspace: workspace
|
|
runAfter:
|
|
- build-and-push |