Create a new Jenkins pipeline and enable the option "GitHub hook trigger for GITScm polling"
In the pipeline definition, set the SCM as Git and paste the repository URL. The branch should be set as "main"
The path to the script for Jenkinsfile must be set to spring-boot-app/JenkinsFile as this is the place where the Jenkinsfile is stored. Then click on Save to create the pipeline.
JenkinsFile for the CI pipeline
The Jenkinsfile to create the CI pipeline looks like this: