Jenkins Build Triggers
- Will help in triggering the Jenkins Build based on
- Periodic: eg. Every 1 hour, Every 2 hours etc
- On Schedule: eg Every weekday at 3 AM
- Git Commits: Any new commits to Git Repo. Two ways of doing this
- POll SCM: Jenkins will poll Git
- Git/Web Hooks: Git will inform Jenkins whenever new commits happen
- After Other Jobs are Built
- Here you configure the schedules by using syntax whichi is much like cron jobs.
MINUTE HOUR DOM MONTH DOW H/15 * * * * 0 4,15 * * *
- Triggers a build whenever changes appear in git.
- Using Jenkins, user should describe how frequently poll should happen. For this we use the same syntax mentioned above
- Some of the Prebuild Actions such as cleaning workspace
- Build Settings such when build is taking more time , abort/fail etc can be configured
- Additions to console logs
Jenkins Logical Architecture
- Any build from Jenkins will be sent to Queue.
- It stays in the Queue till it finds free executor
- Is Execution unit of Jenkins (This is where build happens)
- Number of Executors signify number of parallel builds that can happen
- By Default, A project if it is under execution , will not be executed by other executors (Clicking Build now twice on same project will not lead to two executors)
Jenkins Distributed Builds
- Two kinds of Server Components are present in Jenkins
- Jenkins Service will be running
- Jenkins Home directory will be present
- Communicates with Jenkins Agents using SSH/TCP (jnlp)
- Jenkins Agent will be running
- Only the builds workspaces scheduled will be available
- Every Agent should have some labels.