- Create a GitHub account
- Setup GitHub access via SSH
- Create and checkout a repo fork
- Set up your shell environment
- Install requirements
- Set up a Kubernetes cluster
Then you can iterate.
The Go tools require that you clone the repository to the
src/github.com/tektoncd/chains
directory in your
GOPATH
.
To check out this repository:
- Create your own fork of this repo
- Clone it to your machine:
mkdir -p ${GOPATH}/src/github.com/tektoncd
cd ${GOPATH}/src/github.com/tektoncd
git clone [email protected]:${YOUR_GITHUB_USERNAME}/chains.git
cd cli
git remote add upstream [email protected]:tektoncd/chains.git
git remote set-url --push upstream no_push
Adding the upstream
remote sets you up nicely for regularly
syncing your fork.
You must install these tools:
go
: The language Tekton Chains is built ingit
: For source controlkubectl
(optional): For interacting with your kube cluster
Docker for Desktop using an edge version has been proven to work for both developing and running Pipelines. Your Kubernetes version must be 1.11 or later.
To setup a cluster with GKE:
- Install required tools and setup GCP project
(You may find it useful to save the ID of the project in an environment
variable (e.g.
PROJECT_ID
). - Create a GKE cluster
Note that
the --scopes
argument to gcloud container cluster create
controls what GCP resources the cluster's default service account has access to;
for example to give the default service account full access to your GCR
registry, you can add storage-full
to your --scopes
arg.
To build the Tekton Chains project, you'll need to set GO111MODULE=on
environment variable to force go
to use go
modules.
You can stand up a version of this controller on-cluster (to your kubectl config current-context
):
ko apply -f config/
As you make changes to the code, you can redeploy your controller with:
ko apply -f config/deployment.yaml
You can clean up everything with:
ko delete -f config/
To look at the controller logs, run:
kubectl -n tekton-pipelines logs deployment/tekton-chains-controller