For a CI/CD demo using Tekton Pipelines and Argo CD on OpenShift refer to: https://github.com/siamaksade/openshift-cicd-demo
This repo is CI/CD demo using Tekton pipelines on OpenShift which builds and deploys the Spring PetClinic sample Spring Boot application. This demo creates:
gogs
/gogs
)admin
/admin123
)admin
/admin
)spring-petclinic
repository in Gogs to start the Tekton pipeline
On every push to the spring-petclinic
git repository on Gogs git server, the following steps are executed within the DEV pipeline:
spring-petclinic:[branch]-[commit-sha]
and spring-petclinic:latest
kustomize
, the DEV manifests from Git, and the application [branch]-[commit-sha]
image tag built in previous stepsThe STAGE deploy pipeline requires the image tag that you want to deploy into STAGE environment. The following steps take place within the STAGE pipeline:
kustomize
, the STAGE manifests from Git, and the application [branch]-[commit-sha]
image tag built in previous steps. Alternatively you can deploy the latest
tag of the application image for demo purposes.Get an OpenShift cluster via https://try.openshift.com
Install OpenShift Pipelines Operator
Download OpenShift CLI and Tekton CLI
Deploy the demo
$ oc new-project demo
$ git clone https://github.com/siamaksade/tekton-cd-demo
$ demo.sh install
Start the deploy pipeline by making a change in the spring-petclinic
Git repository on Gogs, or run the following:
$ demo.sh start
Check pipeline run logs
$ tkn pipeline logs petclinic-deploy-dev -n NAMESPACE
unable to recognize "tasks/task.yaml": no matches for kind "Task" in version "tekton.dev/v1beta1"
errors?You might have just installed the OpenShift Pipelines operator on the cluster and the operator has not finished installing Tekton on the cluster yet. Wait a few minutes for the operator to finish and then install the demo.