This Demo repository will deploy and configure a Tekton CI System. The Project will automatically bootstrap a K3d cluster with Flux.
This repository uses GitHub Actions to validate the Tekton config. Every commit triggers a cluster creation and validation. The up-to-date bootstrap process is documented in the GitHub Actions workflow you can find in this repo.
On a high level you need to provide a Github token with the following scopes: repo_status
, public_repo
. You can find the management dialog here. This token is used by the flux operator to connect to the git repository and roll-out the desired cluster state based on this repository.
k3d cluster create -p "8081:80@loadbalancer" --agents 2
This might take some time.
kubectl config use-context k3d-k3s-default
kubectl cluster-info
GITHUB_TOKEN=<token> GITHUB_USER=<username> flux bootstrap github \
--owner=<username-of-the-repo-owner> \
--repository=tekton-demo \
--private=false \
--personal=true \
--branch=main \
--path=clusters/local
kubectl get Kustomization -n flux-system -w
The Dashboard is deployed and accessible via the tekton-dashboard
service on port 9097.
kubectl --namespace tekton-pipelines port-forward svc/tekton-dashboard 9097:9097
You can inspect the deployed tasks and pipelines by issuing those commands. Before following along make sure to install the CLI tools.
tkn task list
tkn pipeline list
Create a pipeline run as follows and issue it via kubectl create -f hello-goodbye-pipeline-run.yaml
. This command will return the created pipelinerun which you need for reference later. E.g. enter tkn pr logs $PIPELINE_RUN_NAME
to get the log output of the pipeline.