Last active
May 2, 2024 15:02
-
-
Save Lucifergene/f491504d7eda8a97e86a132029a9bc7b to your computer and use it in GitHub Desktop.
Pipeline with ApprovalTask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
#BEFORE TASK | |
apiVersion: tekton.dev/v1beta1 | |
kind: Task | |
metadata: | |
name: before | |
spec: | |
steps: | |
- image: quay.io/avik6028/busybox:latest | |
name: before | |
script: echo before wait | |
--- | |
#WAIT TASK => APPROVAL TASK | |
#[WILL BE AUTO-CREATED] | |
--- | |
#AFTER TASK | |
apiVersion: tekton.dev/v1beta1 | |
kind: Task | |
metadata: | |
name: after | |
spec: | |
steps: | |
- image: quay.io/avik6028/busybox:latest | |
name: after | |
script: echo after wait | |
--- | |
#PIPELINE | |
apiVersion: tekton.dev/v1beta1 | |
kind: Pipeline | |
metadata: | |
name: custom-task-beta | |
spec: | |
tasks: | |
- name: before | |
taskRef: | |
name: before | |
- name: wait | |
taskRef: | |
apiVersion: openshift-pipelines.org/v1alpha1 | |
kind: ApprovalTask | |
params: | |
- name: approvers | |
value: | |
- foo | |
- bar | |
- john | |
- kube:admin | |
- name: numberOfApprovalsRequired | |
value: 1 | |
- name: description | |
value: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor tempus eleifend. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In et urna non ligula dictum luctus. Donec suscipit tempor fermentum. Quisque malesuada fringilla tortor, vitae posuere neque mattis in. Vivamus porta placerat nibh, quis faucibus nisl elementum sed. Sed dictum scelerisque ex sit amet bibendum. In quis arcu non massa sodales convallis. Sed varius erat ante, sed lobortis erat varius in. Phasellus tincidunt condimentum erat eu fringilla. Donec ut vehicula nibh, ullamcorper aliquam dolor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Phasellus a lobortis dolor. Maecenas vel arcu vel ligula ullamcorper dignissim. Praesent ultricies, libero et faucibus dictum, tortor libero scelerisque dui, in semper tellus lorem vitae lectus. | |
runAfter: | |
- before | |
- name: after | |
taskRef: | |
name: after | |
runAfter: | |
- wait | |
--- | |
#PLR | |
apiVersion: tekton.dev/v1beta1 | |
kind: PipelineRun | |
metadata: | |
generateName: pr-custom-task-beta- | |
spec: | |
pipelineRef: | |
name: custom-task-beta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment