Menu Close

Setting up a build

 If I was starting a new service or company today, the first thing I would do is implement CI/CD with a Hello World example, and then start iterating from there.
   — Mike Hart

Go and read the whole article.  I enjoyed it.  It explains how Continuous Integration, Continuous Delivery and Continuous Deployment are vital to a working team.

Therefore, I’ve been researching on ways to implement CI/CD with todays tech.  GitHub Actions, Jenkins, Amazon Beanstalk, GitLab.  Numerous startup offerings have gotten into the space, like CircleCI.

I’ve put together a GitHub repo and I’m trying GitHub Actions to see how far I can easily get.

Getting a continuous build is straightforward for a hello world java web app.  A single maven command like:

  mvn archetype:generate -DartifactId=build -Darchetype ArtifactId=maven-archetype-webapp -DarchetypeVersion=1.4 -DinteractiveMode=false

creates a simple java web app which does nothing except say hello.  Turning on Continuous Integration is easy, but the build didn’t add any tests.  Without tests, we don’t have a real integration.  We’ll have to add tests. We could use or Let’s continue that another week.

Where can we deploy it?   Amazon has a free tier with essentially a free VM which we can run endlessly.

How to deliver it? When we deploy to a free Amazon VM, it’s in production, as far as a Hello World app can be in production.

Next week we can discuss another side of continuous integration.


  1. Vinay

    It makes sense. I’ve seen examples where someone starts a project and it compiles on their own machine, and then as soon they try to integrate it into CI/CD, it breaks and they have to spend time refactoring it so that it compiles on a different environment.

    Even for personal development, I’d recommend even having your own dockerfile with the dependencies listed. I’m working in python and I’ve been recently trying my hands on poetry. The advantage is that cleanly manage my library dependencies between projects.

    • Alan

      For sure. If you’re going to deploy with Docker it certainly makes sense to develop with a Docker image right there to test on.

Comments are closed.