Skip to content

Instantly share code, notes, and snippets.

@jkeam
Created August 25, 2021 22:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkeam/ad5beee1d46d27b24386866047e20ad5 to your computer and use it in GitHub Desktop.
Save jkeam/ad5beee1d46d27b24386866047e20ad5 to your computer and use it in GitHub Desktop.
Creating a basic pipeline in OpenShift 4.7 using OpenShift Pipelines 1.4
#!/bin/bash
oc new-project pipelines-tutorial
oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/pipelines-1.4/01_pipeline/01_apply_manifest_task.yaml
oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/pipelines-1.4/01_pipeline/02_update_deployment_task.yaml
oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/pipelines-1.4/01_pipeline/04_pipeline.yaml
tkn pipeline start build-and-deploy \
-w name=shared-workspace,volumeClaimTemplateFile=https://gist.githubusercontent.com/jkeam/0a61b51535c00d879adcb4418da8d62e/raw/2126834b525af58a64e108843d81b02620bafc1f/tekton-workspace-pvc.yaml \
-p deployment-name=pipelines-vote-api \
-p git-url=https://github.com/openshift/pipelines-vote-api.git \
-p IMAGE=image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/pipelines-vote-api
@jkeam
Copy link
Author

jkeam commented Aug 25, 2021

You will need the oc and tkn cli's installed. Also make sure you are logged into your cluster.

@jkeam
Copy link
Author

jkeam commented Aug 26, 2021

If you are using OpenShift Pipelines 1.3 or 1.5, just replace with the appropriate yamls from the appropriate branch from the github repo https://github.com/openshift/pipelines-tutorial/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment