Code Monkey home page Code Monkey logo

pipline's Introduction

docker-jenkins-java-pipeline

Manual Steps

  1. Start database: docker run -d --name db -p 8091-8093:8091-8093 -p 11210:11210 moaaztaha/oreilly-couchbase:latest

  2. Run app

    1. Using Maven

      1. Build app: mvn -f webapp/pom.xml clean package

      2. Run app: mvn -f webapp/pom.xml exec:java -DskipTests

      3. Run test: mvn -f webapp/pom.xml test

    2. Using Docker

      1. Build app: docker-compose build app

      2. Run app:

        docker-compose run -e DB_URI=`docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' db` app
      3. Run test: mvn test

Jenkins

Configure

  1. Download Jenkins, this was tested with 2.21[http://mirrors.jenkins-ci.org/war/2.21/jenkins.war].

  2. Start Jenkins: JENKINS_HOME=~/.jenkins java -jar ~/Downloads/jenkins-2.21.war --httpPort=9090

  3. Create First Admin User, Save and Finish.

  4. Install suggested plugins

  5. Manage Jenkins, Global Tool Configuration, configure Maven, use name Maven3 (this name is used in Jenkinsfile)

  6. Manage Jenkins, Manage Plugins, Available, install CloudBees Docker Pipeline plugin, Install without restart, select Restart Jenkins

Create Project

  1. Create a new project of the type Pipeline

  2. Configure git repo

  3. Build Now

pipline's People

Contributors

moaazelzayat avatar

Watchers

aland-zhang 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.