Skip to content
tektoncd-pipeline operator for Kubernetes to manage installation, updation and uninstallation of tekton-cd pipelines.
Go Makefile Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
build Improve release documentation Jan 2, 2020
cmd/manager Add Operator UUID to config status Dec 3, 2019
deploy Merge pull request #167 from nikhil-thomas/release-v0.9.1 Jan 7, 2020
make Auto creates SA and RBAC for pipelines Oct 4, 2019
openshift/release Retry fetching the pipeline nightly release Jan 8, 2020
pkg Make release-v0.9.0 Dec 23, 2019
test Verify triggers deployment Nov 26, 2019
.csv-config.yaml New clusterwide operator and CRD Jul 12, 2019
.yamllint Keep yamllint rules same across projects Jan 7, 2020
LICENSE Initial commit Apr 2, 2019
OWNERS Adds OWNERS for CI auto merge to work Nov 27, 2019 Add a FAQ Document Jan 7, 2020 Improve release documentation Jan 2, 2020
go.mod Add pipeline samples for UI Dec 17, 2019
gofmt_exclude Fix Makefiles and linting errors Jun 12, 2019



click here

Dev env

Checkout your fork

The Go tools require that you clone the repository to the src/ directory in your GOPATH.

To check out this repository:

  1. Create your own fork of this repo
  2. Clone it to your machine:
mkdir -p ${GOPATH}/src/
cd ${GOPATH}/src/
git clone${YOUR_GITHUB_USERNAME}/tektoncd-pipeline-operator.git
cd tektoncd-pipeline-operator
git remote add upstream
git remote set-url --push upstream no_push


You must install these tools:

  1. go: The language Tektoncd-pipeline-operator is built in
  2. git: For source control
  3. kubectl: For interacting with your kube cluster
  4. operator-sdk:
  5. minikube:

Install Minikube

Create minikube instance

minikube start -p mk-tekton \
 --cpus=4 --memory=8192 --kubernetes-version=v1.12.0 \
 --extra-config=apiserver.enable-admission-plugins="LimitRanger,NamespaceExists,NamespaceLifecycle,ResourceQuota,ServiceAccount,DefaultStorageClass,MutatingAdmissionWebhook"  \

Set the shell environment up for the container runtime

eval $(minikube docker-env -p mk-tekton)

Development build

  1. Change directory to '${GOPATH}/src/'
cd ${GOPATH}/src/
  1. Build go and the container image
make osdk-image IMAGE_TAG=${YOUR_REGISTRY}/openshift-pipelines-operator:${YOUR_IMAGE_TAG}
  1. Push the container image
docker push ${YOUR_REGISTRY}/openshift-pipelines-operator:${YOUR_IMAGE_TAG}
  1. Edit the 'image' value in deploy/operator.yaml to match to your image

Running tests

Install OLM

Clone OLM repository (into go path)

git clone \

Install OLM

Ensure minikube is installed and docker env is set see above

cd $GOPATH/src/
GO111MODULE=on NO_MINIKUBE=true make run-local

NOTE: NO_MINIKUBE=true: we don't want to start a new minikube instance while installing OLM

Launch web console

Open a new terminal

cd $GOPATH/src/

Deploy openshift-pipelines-operator on minikube for testing

  1. Change directory to ${GOPATH}/src/

  2. Create openshift-operators namespace

    kubectl create namespace openshift-operators

  3. Apply operator crd

    kubectl apply -f deploy/crds/*_crd.yaml

  4. Deploy the operator

    kubectl apply -f deploy/ -n openshift-operators

  5. Install pipeline by creating an Install CR

    kubectl apply -f deploy/crds/*_cr.yaml

Deploy openshift-pipelines-operator using CatalogSource on OLM

  1. Install minikube see above

  2. Install olm see above

  3. Create openshift-operators namespace

    kubectl create namespace openshift-operators

  4. Generate local catalog source

    NAMESPACE=operators ./scripts/ > olm/openshift-pipelines-operator.resources.yaml

  5. Add local catalog source

    kubectl apply -f olm/openshift-pipelines-operator.resources.yaml

    Once the CatalogSource has been applied, you should find it under Catalog > Operator Management of the web console

  6. Subscribe to Openshift Pipelines Operator

    1. Open web console

    2. Select openshift-operators namespace

    3. Select Catalog > Operator Management

    4. Select Catalog > Operator Management > Operator Catalogs

    5. Scroll down to Openshift Pipelines Operator under Openshift Pipelines Operator Registry

      NOTE: it will take a few minutes to appear after applying the catalogsource

    6. Click Create Subscription button

      1. ensure namespace in yaml is openshift-operator e.g.

        sample subscription
          kind: Subscription
            generateName: openshift-pipelines-operator-
            namespace: openshift-operators
            source: openshift-pipelines-operator-registry
            sourceNamespace: openshift-operators
            name: openshift-pipelines-operator
            startingCSV: openshift-pipelines-operator.v0.3.1
            channel: alpha
      2. Click Create button at the bottom

  7. Verify operator is installed successfully

    1. Select Catalog > Installed operators
    2. Look for Status InstallSucceeded
  8. Install Tektoncd-Pipeline by creating an install CR

    1. Select Catalog > Developer Catalog, you should find Openshift Pipelines Install

    2. Click on it and it should show the Operator Details Panel

    3. Click on Create which show an example as below

          kind: Install
          name: pipelines-install
          namespace: openshift-pipelines-operator
          spec: {}

      NOTE: This will install Openshift Pipeline resources in Tekton-Pipelines Namespace

    4. Verify that the pipeline is installed

      1. Ensure pipeline pods are running

        kubectl get all -n tekton-pipelines

      2. Ensure pipeline crds exist

        kubectl get crds | grep tekton

        should show

    NOTE: Now TektonCD Pipelines can be created and run

End to End workflow

This section explains how to test changes to the operator by executing the entire end-to-end workflow of edit, test, build, package, etc...

It asssumes you have already followed install minikube and OLM.

Generate new image, CSV

  1. Make changes to the operator
  2. Test operator locally with operator-sdk up local
  3. Build operator image operator-sdk build <imagename:tag>
  4. Update image reference in deploy/operator.yaml
  5. Update image reference in CSV deploy/olm-catalog/openshift-pipelines-operator/0.3.1/openshift-pipelines-operator.v0.3.1.clusterserviceversion.yaml

Update Local CatalogSource

    1. Build local catalog source localOperators

    NAMESPACE=operators ./scripts/ > olm/openshift-pipelines-operator.resources.yaml

You can’t perform that action at this time.