DockerHub account: https://www.docker.com/ GitHub account: https://github.com/
A GitHub personal access token to push content from the CI pipeline.
Check this doc to learn how to create one: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
A Kubernetes cluster with Tekton and ArgoCD installed.
Fork the following repo https://github.com/lordofthejars/pacman-kikd to your GH account.
In order to run the example, you need to configure GitHub and DockerHub parameters.
Update src/main/tekton/dockerhub-secret.yaml
with your DockerHub username and password.
Update src/main/tekton/github-secret.yaml
with your GitHub username and personal token.
Update src/main/tekton/app-resources.yaml
setting the value
field to the forked repo (your account).
Update src/main/tekton/build-app-task-run.yaml
changing lordofthejars
to your docker account username.
kubectl apply -f src/main/argocd/openshift/pacman-application.yaml
After that, Pacman is up and running because ArgoCD has deployed the first version.
Create a namespace to run pipeline:
kubectl create namespace pacman-build
kubens pacman-build
Create Kubernetes secrets:
kubectl apply -f src/main/tekton/dockerhub-secret.yaml
kubectl apply -f src/main/tekton/github-secret.yaml
Create a service account to run pipeline:
kubectl apply -f src/main/tekton/service-account.yaml
Create the tekton resource:
kubectl apply -f src/main/tekton/app-resource.yaml
Create the Tekton task that implements the CI part:
kubectl apply -f src/main/tekton/build-app-task.yaml