Giter Club home page Giter Club logo

cicd-applied-to-spring-boot-java-app's Introduction

cicd-applied-to-spring-boot-java-app

Implementing Continuous Integration/Continuous Delivery on Spring Boot Java App

Build Status docker build codecov Quality Gate License: MIT

Please read this first : #1

I'm so sorry to not apply the changes right now because I'm seeking job.

Read the article and this issue.

I'll come back soon.

I've added Javadoc plugin in pom.xml

https://fanjups.github.io/cicd-applied-to-spring-boot-java-app/project-reports.html

I've added packaging jar

<packaging> jar </packaging>

I've added mvn clean in .travis.yml

I've created .dockerignore

cicd-applied-to-spring-boot-java-app's People

Contributors

fanjups avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cicd-applied-to-spring-boot-java-app's Issues

Some problems to note

First of all, thank you for sharing. It was very useful.

But I must notice some problems:

  • You don't need to link your Docker repository with GitHub: As we are deploying to DockerHub using maven, DockerHub does not need to try to build the Docker image directly using the Dockerfile form GitHub. That said, If you download your Docker images (for example your current last build you can check that they don't work as expected. The problems in not with the enconding (as you pointed in the article). The problem is that the image is built by DockerHub and includes your repository source code in an app.jar directory inside the image, not the app.jar generated by maven (as the DockerHub does not run maven). If you link your DockerHub repository with your GitHub repository, everything needed by your Dockerfile must be in the git repo (or accesible by the build using curl or something).
  • Something similar is with Heroku. You can tell Heroku to build and deploy your app (linking Heroku with GitHub) or you can build your app with maven and send it to Heroku (using heroku-maven-plugin). Your approach uses the last option so is Travis CI the responsible for building and sending the generated jar to Heroku.
  • Other aspect to take into account is your Dockerfile base image. Using jre instead of jdk is enough for the case (and the image size is smaller)
  • Also notice, that deploying an exploded jar is considered much better than deploying a fat jar (see Spring Boot with Docker Getting Started Guide) as you can reuse the layers with the dependencies an only update the layer with your application code.

Hopes this helps you :)

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.