Giter Club home page Giter Club logo

tekton-cd-demo's Introduction

CI/CD Demo with Tekton Pipelines

This repo is a sample Tekton pipeline that builds and deploys the Spring PetClinic sample Spring Boot application on OpenShift. This demo creates:

  • 3 namespaces for CI/CD, DEV and STAGE projects
  • A sample Tekton pipeline
  • Gogs git server (username/password: gogs/gogs)
  • Sonatype Nexus (username/password: admin/admin123)
  • SonarQube (username/password: admin/admin)
  • Report repository for test and project generated reports
  • Imports Spring PetClinic repository into Gogs git server
  • Adds a webhook to 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 pipeline:

  1. Code is cloned from Gogs and the unit-tests are run
  2. Application is packaged as a JAR and pushed to Sonatype Nexus snapshot repository
  3. In parallel, the code is analyzed by SonarQube for anti-patterns, code coverage and potential bugs
  4. A container image (spring-petclinic:latest) is built using the Source-to-Image for Java apps, and pushed to OpenShift internal registry
  5. Application image is deployed with a rolling update

Pipeline Diagram

Deploy

  1. Get an OpenShift cluster via https://try.openshift.com

  2. Install OpenShift Pipelines Operator

  3. Download OpenShift CLI and Tekton CLI

  4. Deploy the demo

    $ oc new-project demo
    $ git clone https://github.com/siamaksade/tekton-cd-demo 
    $ demo.sh install
    
  5. Start the deploy pipeline by making a change in the spring-petclinic Git repository on Gogs, or run the following:

    $ demo.sh start
    
  6. Check pipeline run logs

    $ tkn pipeline logs petclinic-deploy-dev -f NAMESPACE
    

Pipelines in Dev Console

Pipeline Diagram

tekton-cd-demo's People

Contributors

siamaksade avatar hatmarch avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.