Skip to content

Instantly share code, notes, and snippets.

@jwntrs
Last active September 2, 2020 13:13
Show Gist options
  • Save jwntrs/581e995ad468ce31f072a6ecc265c4a5 to your computer and use it in GitHub Desktop.
Save jwntrs/581e995ad468ce31f072a6ecc265c4a5 to your computer and use it in GitHub Desktop.
apiVersion: experimental.kontinue.io/v1
kind: Workflow
metadata:
name: unit-pass
spec:
sources:
- name: repo
sourceRefs:
- name: git-repo-pass
kind: GitSource
apiVersion: experimental.kontinue.io/v1
templateRef:
name: unit
---
apiVersion: experimental.kontinue.io/v1
kind: Workflow
metadata:
name: unit-fail
spec:
sources:
- name: repo
sourceRefs:
- name: git-repo-fail # kontinue/fail
kind: GitSource
apiVersion: experimental.kontinue.io/v1
templateRef:
name: unit
---
apiVersion: experimental.kontinue.io/v1
kind: WorkflowTemplate
metadata:
name: unit
spec:
sources:
- name: repo
steps:
- name: test
sources: [repo]
templates:
- template: |-
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
generateName: unit-test-
spec:
taskSpec:
steps:
- name: run
image: {{ .Sources.repo.kontinue.image }}
script: |
set -o xtrace
set -o errexit
git clone https://github.com/{{ .Sources.repo.url }} repo && cd repo
git checkout {{ .Sources.repo.revision }}
{{ .Sources.repo.kontinue.test.command }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment