Here are the steps I’ve executed on a remote personal machine to set up CI/CD for my App Distribution – Spring Boot – Vaadin App.
On Remote Personal Machine
1) define remote git repository
cd git/
mkdir my_app
cd my_app/
git init –bare
pwd //outputs the current directory
Git Hook
cd hooks
edit post-update
curl to Jenkins with custom token
make post-update executable (chmod +x)
On Local Machine
git remote add origin ssh:// ……..
CI/CD Jenkins Job Set Up
in Jenkins – create a job that will
- make git pull
- execute tests
- execute build
- deploy / stop/start docker container
- Test it by running it manually
- verify with smoke git push
Configure Spring Boot
- database connections
- docker compose settings
- application.properties or more precisely – application-prod.properties
This article showcases the steps I started having some time ago: https://programtom.com/dev/2024/04/07/java-development-in-2024-feels-more-like-devops/