Requires Go version 1.12.6 - download for your development environment here.
This repository uses Go modules. You may need to export GO111MODULE=on
to turn modules support "on".
To run this operator locally you need to have at least one Minishift profile started:
$ minishift start
Then you can run the operator locally with the help of operator-sdk
(you need version v0.10.0 or higher):
$ make up-local
That Makefile target takes care of additional several steps which can be executed separately:
-
logging as system:admin user:
$ make login-as-admin
-
creating local test namespace:
$ make create-namespace
-
deploy CRDs:
$ make deploy-crd
-
building the project:
$ make build
-
deploying ClusterRole/ClusterRoleBinding and creating ServiceAccount:
$ make deploy-rbac
There are a few more targets that you can find useful:
-
to login as system:admin user and enter the local test namespace:
$ make use-namespace
-
to remove the local test namespace:
$ make clean-namespace
-
to remove & create the local test namespace, and create ClusterRole/ClusterRoleBinding and ServiceAccount inside of the namespace:
$ make reset-namespace
It's possible to verify the OpenShift CI config from the developer's laptop while all the jobs are executed on the remote, online CI platform:
-
checkout and build the CI Operator command line tool
-
login to https://console.svc.ci.openshift.org (via GH OAuth) and copy the login command (you may need to switch to the
application console
) -
login with the command aferementioned
-
run the CI jobs with
ci-operator --config ../../openshift/release/ci-operator/config/codeready-toolchain/toolchain-operator/codeready-toolchain-toolchain-operator-master.yaml --git-ref=codeready-toolchain/toolchain-operator@master
assuming that the OpenShift Release repo was checked you.
Note
|
you can ignore the RBAC issues that are displayed in the console |