This is a sample gradle project that tests various continuous integration and delivery services.
It is a very simple spring boot based web application with an almost empty test class. The repository can be found at https://github.com/westernacher-solutions/sample-ci-cd .
Travis CI
The https://travis-ci.org continuous integration service automatically builds the github repository after each push to the configured branch.
The current repository can be found at https://travis-ci.org/westernacher-solutions/sample-ci-cd .
A .travis.yml configuration file with some basic setup is needed for building.
Travis runs the tests but does not visualize the junit report files.
It is recommended to enable the test reporting in build.gradle.
Snap CI
The https://snap-ci.com continuous integration service works somewhat similar to Travis CI.
The current repository can be found at https://app.snap-ci.com/westernacher-solutions/sample-ci-cd/branch/master .
The setup is done in the web UI.
There is no configuration file in the repository.
Junit report files are not visualized similar to Travis CI.
Circle CI
-
Todo
Bitrise
Shippable
Bitbucket pipelines
The https://bitbucket.org/ pipelines service is similar to Travis CI but works only with repositories hosted on Bitbucket. It replaces the discontinued Bamboo cloud service. It is not tested here but mentioned for completeness.
Codefresh
The https://codefresh.io service is both a continuous integration and delivery service built on docker. In contrast to the other services above it does not understand gradle builds itself but it depends on a Dockerfile which is shipped in this repository. It does not only build the software - it deploys it by creating a docker container. The full web application is available after launching. The current repository can be found at https://g.codefresh.io/repositories/westernacher-solutions/sample-ci-cd/services . The setup is done in the web UI. Junit report files are not visualized similar to Travis CI but it supports running integration tests. Complex deployment scenarios - so called compositions - can be defined like setting up a database container.
zeit now
The https://zeit.co build and deployment service is a build and deployment service. It does not provide a full web UI but a command line tool instead.
It must be installed initially with npm install -g now .
|
The build and deployment process is started by running now
and will use our Dockerfile.
The very first run of now
asks for your email address for authentication.
It works like a charm!
The now tool copies the target URL into the clipboard.
Opening this url in the browser either shows the running build process or the deployed web app after deployment has finished.
use your own docker
-
build image from our Dockerfile:
docker build . -t sample-ci-cd
-
start a fresh container:
docker run -it --rm -p8080:8080 sample-ci-cd
-
navigate to http://localhost:8080
run it locally without docker
-
build and test it:
./gradlew build
-
start the webapp:
./gradlew bootRun
-
navigate to http://localhost:8080