Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom preparation step #1

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pipelines/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ spec:
type: string
description: "Tag of the iqe image to run tests from"
default: ""
- name: CUSTOM_PREPARATION_TASK_NAME
type: string
description: "Custom preparation task to run before running the tests"
default: "noop"
results:
- name: ARTIFACTS_URL
description: URL for the test's artifacts
Expand Down Expand Up @@ -209,6 +213,18 @@ spec:
value: "$(params.REVISION)"
- name: pathInRepo
value: tasks/deploy.yaml
- name: custom-preparaion
taskRef:
resolver: git
params:
- name: url
value: "$(params.URL)"
- name: revision
value: "$(params.REVISION)"
- name: pathInRepo
value: tasks/$(params.CUSTOM_PREPARATION_TASK_NAME).yaml
runAfter:
- deploy-application
- name: run-iqe-cji
params:
- name: BONFIRE_IMAGE
Expand Down Expand Up @@ -253,6 +269,7 @@ spec:
value: "$(params.IQE_IMAGE_TAG)"
runAfter:
- deploy-application
- custom-preparaion
taskRef:
resolver: git
params:
Expand Down
10 changes: 10 additions & 0 deletions tasks/noop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: noop
spec:
steps:
- name: noop-preparation
image: ubuntu
command: [echo]
args: ["No preparation step needed"]
16 changes: 16 additions & 0 deletions tasks/preparation-provisioning.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: noop
spec:
params:
- name: BONFIRE_IMAGE
type: string
description: The container Bonfire image to use for the tekton tasks
default: quay.io/redhat-user-workloads/hcc-devprod-tenant/hcc-cicd-tools/cicd-tools:eb1904eafc2d8af8a26b435de393d4776d9db2f6
steps:
- name: stub-images-script
image: "$(params.BONFIRE_IMAGE)"
# TODO - figure out how to include the script.
script: |
echo "I could do something, but not sure how, but you get the point :)"