Example of Quarkus CI/CD application using Jenkins on Kubernetes
- minikube v1.0.0+ https://github.com/kubernetes/minikube/releases
minikube profile cicd
minikube addons enable metrics-server
minikube config set memory 8192
minikube config set cpus 3
minikube start \
--extra-config=controller-manager.horizontal-pod-autoscaler-downscale-stabilization=30s \
--extra-config=controller-manager.horizontal-pod-autoscaler-cpu-initialization-period=30s \
--extra-config=controller-manager.horizontal-pod-autoscaler-sync-period=10s
minikube ssh -- "mkdir -p /tmp/m2 && sudo chmod 777 /tmp/m2"
kubectl create namespace cicd
git clone https://github.com/rafabene/cicd-kb8s/
cd cicd-kb8s/
cd jenkins-slave
./build-docker.sh
cd jenkins/
# Build and deploy Jenkins
./deploy-jenkins.sh
# Open Jenkins Console
./open-jenkins.sh
Perform the first build manually using Jenkins. This will enable the SCM polling.
cd webstore/
./open-app.sh
cd webstore/
mvn package -Pnative -Dnative-image.docker-build=true -DskipTests
eval $(minikube docker-env)
docker build -t rafabene/cloudnative -f src/main/docker/Dockerfile.native .
kubectl create -f Deployment.yaml -f Service.yaml
./open-app.sh