Code Monkey home page Code Monkey logo

k8jenkins's Introduction

k8jenkins

k8jenkinspipelinescript

node{

stage("Git Clone"){
git credentialsId: 'GIT_CREDENTIALS', url: 'https://github.com/ravisf1012/spring-boot-mongo-docker.git'
}
stage("Maven Clean Build"){
def mavenHome = tool name:"Maven-3.6.1", type:"maven"
def mavenCMD = "${mavenHome}/bin/mvn "
sh "${mavenCMD} clean package"
}
stage("Build Docker Image"){
sh "docker build -t develop/spring-boot-mongo ."    
}
stage("Docker Push"){
    withCredentials([string(credentialsId: 'DOCKER_HUB_CREDENTIALS', variable: 'DOCKER_HUB_CREDENTIALS')]) {
    sh "docker login -u develop -p ${DOCKER_HUB_CREDENTIALS}"
    sh "docker push develop/spring-boot-mongo "
}
stage("Deploy Application in k82 Cluster"){
    kubernetesDeploy(
        configs: 'springBootMongo.yml' ,
        kubeconfigId: 'KUBERNETES_CLUSTER_CONFIG' ,
        enableConfigSubstitution: true
        )
}    
}

}

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.