This application is used to demonstrate the CI/CD workflow using GitHub Actions as well as its operation in Kubernetes environment using GitOps tecniques.
$ docker run \
-ti \
--rm \
-p 8080:8080 \
-e ENVIRONMENT=local \
-e VERSION=latest \
dennydgl1/java-hello-world:latest
$ curl http://localhost/greet | jq .
{
"message": "Hello World v.latest from host 59dfb6b554xbjj7! I'm running in local!"
}
Please use the "Feature Branch" branching strategy to develop this application:
Every time a tag is pushed to origin, a CI/CD workflow starts to:
- build sources (Maven)
- test the application (JUnit)
- package the application (Maven)
- build the image (Docker)
- push the image (Docker Hub)
So for example this command:
$ export TAG=3.0 && git tag $TAG && git push origin $TAG
tags the application as 3.0 and starts the process.
To delete a tag:
$ git tag -d $TAG && git push --delete origin $TAG