Skip to content

Tekton pipeline using spring boot with artefact caching and sonar integration (optional)

License

Notifications You must be signed in to change notification settings

schen1/springboot-tekton

Repository files navigation

springboot-tekton

Prerequisites

Tekton or OpenShift pipelines installed Helm Tekton CLI (Optional)

Setup projects and rolebindings

$ oc create -f https://raw.githubusercontent.com/schen1/container-pipelines/feature/tekton/basic-spring-boot-tekton/.openshift/projects/projects.yml

Install the pipelines using helm

$ helm upgrade --install springboot-pipelines . -n basic-spring-boot-build

Run the pipeline

Either using the oc command

$ oc create -f pipelinerun.yaml -n basic-spring-boot-build

Or using tekton cli (version 0.9.0)

$ tkn pipeline start basic-spring-boot-pipeline \
    --resource basic-spring-boot-git=basic-spring-boot-git \
    --resource basic-spring-boot-templates=basic-spring-boot-templates \
    --resource basic-spring-boot-image=basic-spring-boot-image \
    --workspace name=local-maven-repo,claimName=maven-repo-pvc \
    -n basic-spring-boot-build

Using Triggers

You can add a GitHub webhook that will POST to a JSON event to your Webhook listener:

$ echo "URL: $(oc  get route webhook-listener --template='https://{{.spec.host}}' -n basic-spring-boot-build)"

Additional information is available in the references.

Support

Add PVC for maven caching

Cleanup

$ helm delete springboot-pipelines -n basic-spring-boot-build
$ oc delete project basic-spring-boot-build \
basic-spring-boot-dev \
basic-spring-boot-stage \
basic-spring-boot-prod

References

Container pipelines from Red Hat CoP

Maven caching

Tekton catalog

Pipeline start command

About triggers - Creating Applications With CICD pipelines

About

Tekton pipeline using spring boot with artefact caching and sonar integration (optional)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages