GithubHelp home page GithubHelp logo

belajar-ci's Introduction

Belajar Continuous Integration dan Deployment

Build Status Coverage Status

Teknologi yang digunakan

  • Maven

  • MySQL

  • Spring Boot

    • Hibernate
    • Spring Data JPA
    • Spring Test
    • Spring MVC
  • Continuous Integration

    • Travis CI
    • Jenkins
    • Gitlab CI

Build Docker Image

Agar bisa menggunakan docker, kita install dulu docker dan docker-machine. Instalasinya bisa dibaca di artikel ini.

  1. Siapkan dulu docker-machine. Pada contoh ini kita akan menggunakan Digital Ocean supaya hemat bandwidth.

     docker-machine create --driver digitalocean --digitalocean-size 1gb --digitalocean-access-token yaddayaddayadda docker-ocean
    
  2. Update environment variable supaya perintah docker kita diarahkan ke droplet DO kita tadi

     eval $(docker-machine env docker-ocean)
    
  3. Build docker container untuk aplikasi kita

     docker build -t endymuhardin/belajar-ci . 
    
  4. Jalankan aplikasi dengan docker-compose

     docker-compose up
    
  5. Lihat IP address docker engine kita dengan perintah berikut

     docker-machine env docker-ocean
    

    Outputnya sebagai berikut

     export DOCKER_TLS_VERIFY="1"
     export DOCKER_HOST="tcp://159.203.84.26:2376"
     export DOCKER_CERT_PATH="/Users/endymuhardin/.docker/machine/machines/docker-ocean"
     export DOCKER_MACHINE_NAME="docker-ocean"
    
  6. Test dengan cara browse ke http://159.203.84.26/api/product/. Outputnya seharusnya seperti ini

     {
       "content" : [ {
         "id" : "p001",
         "code" : "P-001",
         "name" : "Product 001",
         "price" : 101001.01
       } ],
       "totalElements" : 1,
       "totalPages" : 1,
       "last" : true,
       "sort" : null,
       "first" : true,
       "numberOfElements" : 1,
       "size" : 20,
       "number" : 0
     }
    

CI dengan Travis

  • History hasil build bisa dilihat di sini
  • Hasil deployment Heroku bisa diakses di sini

CI dengan Gitlab

  • History hasil build bisa dilihat di sini
  • Hasil deployment Google Container Engine bisa diakses di sini

belajar-ci's People

Contributors

endymuhardin avatar

Watchers

James Cloos avatar  avatar  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.