Skip to content

Instantly share code, notes, and snippets.

@navidshaikh
Last active September 18, 2019 07:00
Show Gist options
  • Save navidshaikh/1482ad64544bf294f0b2b90390b99e5d to your computer and use it in GitHub Desktop.
Save navidshaikh/1482ad64544bf294f0b2b90390b99e5d to your computer and use it in GitHub Desktop.
oc create -f https://github.com/tektoncd/pipeline/releases/download/v0.6.0/release.yaml
# wait for tekton to setup
oc new-project tutorial
oc create serviceaccount pipeline
oc adm policy add-scc-to-user privileged -z pipeline
oc adm policy add-role-to-user edit -z pipeline
# install buildah task
oc create -f https://raw.githubusercontent.com/tektoncd/catalog/master/buildah/buildah.yaml
cat buildah_taskrun.yaml
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
generateName: buildah-
spec:
serviceaccount: pipeline
taskRef:
name: buildah
inputs:
params:
- name: TLSVERIFY
value: "false"
resources:
- name: source
resourceSpec:
type: git
params:
- name: url
value: https://github.com/navidshaikh/go-helloworld
outputs:
resources:
- name: image
resourceSpec:
type: image
params:
- name: url
value: default-route-openshift-image-registry.apps-crc.testing/tutorial/go-helloworld
oc create -f buildah_taskrun.yaml
oc get taskrun
tkn tr logs $TASKRUN_NAME -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment