Integrating Jenkins with local git hooks and deploying the source code on docker containers using PollSCM triggers.
Three jobs are needed for simulating this project.
- Job 1
For deploying testing environment on the top of docker using git hooks(post-commit) when any commits are done from the featured branch( other than master(main branch)) and the job is scheduled using PollSCM.
git hooks => post-commit script vi .git/hooks/post-commit
#!/bin/bash…