Skip to content
Simple Spring Boot project for use in a Continous Delivery Pipeline.
Java Shell HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts
src
tests
Dockerfile
Dockerfile.build
README.md
go-pipelineconf.xml
pom.xml

README.md

Doodleshop Continuous Delivery Demo Application

Features:

  • Spring Boot runnable application with embedded Tomcat and deployable war
  • Spring Boot Actuator with production grade services
  • Automatic versioning in MANIFEST.MF and in resource /appversion read from build pipeline environment variable
  • Environment detection using environment variable se.caglabs.doodleshop.environment
  • Environment specific configuration and log configuration using Spring profiles (application.yaml)
  • Unit tests and integration tests
  • Flyway DB setup and migration
  • Database H2, embedded if not specified external in application.yaml

Build

$ mvn install

Run Integration tests

$ mvn -Pint-test verify

Run

$ java -jar doodleshop.war

For specific environment, specify:

$ java -Dse.caglabs.doodleshop.environment=stage -jar doodleshop.war

where se.caglabs.doodleshop.environment is (local | autosmall | autolarge | stage | prod)

Test

The application has a few simple endpoints where you can store and read Doodles.

Create a doodle: $ curl -H "Content-Type: application/json" -X POST -d '{"author":"Hoomer","message":"Ummm..."}' http://localhost:8080/doodles

Read created doodles: $ curl http://localhost:8080/doodles?author=Homer

Run with external MySQL

Start a MySQL database:

$ docker run --name mysql -e MYSQL_ROOT_PASSWORD=doodlepass -d -p 3306:3306 mysql:5.7

Connect a database tool and create a database:

create database doodleshop;

Run with "stage" environment: -Dse.caglabs.doodleshop.environment=stage

Have fun, Daniel Marell

You can’t perform that action at this time.