GithubHelp home page GithubHelp logo

kirikae / demo-tekton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snowjet/demo-tekton

0.0 1.0 0.0 272 KB

Demo showing the difference between a Jenkinsfile pipeline and a Tekton pipeline doing the same tasks

License: GNU General Public License v3.0

Shell 51.69% Dockerfile 48.31%

demo-tekton's Introduction

Jenkins vs. Tekton Pipeliens Demo

Complete App

Deploy a complete application that has a frontend, backend, database and an "external api" useful for showcasing the value of Tekton

Complete App Topology

export PROJECT="quoter"

bash ./create_app.sh
bash ./create_tekton.sh

Jenkins Components

Steps for building the Jenkins Pipeline Components

Jenkins

export PROJECT="pipes"

bash ./create_jenkins.sh

Pipelines (Tekton)

There are two Tekton pipelines offered by this applicaiton. One, which utilises a shared workspace and one that doesn't. This demonstrates both the benefit containers can provide to testing and the speed benefits of using workspaces.

Pipelines with Workspaces and Caching

The pipeline below only clones the repo once and pypi modules oncce. This is then used throughout the test and build processes to speed up deployments. The pipeline run 25% quicker than the non-caching version.

Pipeline

Install the pipelines with workspaces:

export PROJECT="pipes"
cat ./tekton/pipeline-ws/*.yml | envsubst '${PROJECT}' | oc apply -n ${PROJECT} -f -

Pipelines with no caching

The pipeline below needs to clone and download the pypi modules 3 times, once for each pytest and again for the build.

Pipeline

Install the pipelines without workspaces:

export PROJECT="pipes"
cat ./tekton/pipeline-no-ws/*.yml | envsubst '${PROJECT}' | oc apply -n ${PROJECT} -f -

Application

export PROJECT="pipes"
export POSTGRESQL_DATABASE="quotes"
export POSTGRESQL_USER="user"
export POSTGRESQL_PASSWORD="`head /dev/urandom | base64 | head -c 13 ; echo ''`"
export external_imape_base_url="http://imagelookup.${PROJECT}.svc.cluster.local:8080"

cat ./app/manifests/backend/backend.yml | envsubst '${PROJECT} ${external_imape_base_url} ${POSTGRESQL_DATABASE} ${POSTGRESQL_USER} ${POSTGRESQL_PASSWORD}' | oc apply -n ${PROJECT} -f -

cat ./app/manifests/frontend/*.yml | envsubst '${PROJECT}' | oc apply -n ${PROJECT} -f -
oc apply -f ./app/manifests/imagelookup  -n ${PROJECT}

oc expose svc/frontend  -n ${PROJECT}

demo-tekton's People

Contributors

snowjet avatar

Watchers

 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.