Topics
- Upstream and Downstream jobs in jenkins
- Git Submodules
- Git Hooks
- Pull request based workflow
- Branching Strategies
- Build and Deploy of some application
- Adding Security to pipelines
- Exercise
Upstream and Downstream jobs in Jenkins
- Upstream project refers to project that triggered the build of current project. Downstream refers to the project that will be triggered by current project
- This can be configured in
- PostBuild Actions of Upstream
- Build triggers of Current Project
- Lets configure B as Downstream of A
- Lets configure C as Downstream of B
- Overview
- Lets Build A
Git Submodules
- Git Submodules allows us to use a repository within repository
- Refer Here for submodule
- Refer Here to this repository for submodules
- To push the changes in the submodules the push command
git push origin HEAD:<branch>
Git Alias
- Refer Here For Git Alias
- Git allows to create alias for existing commands.
- Alias are stored in config files
alias.pushsub=push origin HEAD:master
alias.rspush=push --recurse-submodules=check
alias.history=log --graph --decorate --pretty=oneline --abbrev-commit
alias.pushmain=push origin HEAD:main
alias.s=status
alias.pr=pull
Git Hooks
- Hooks help us in adding custom behavior to Git
- To handle local events git has client side hooks and to handle remote events git has server side hooks.
- Refer Here for git hooks
- In .git folder you have hooks folder
- Refer Here for sample hooks repo
- For Remote repositories which are self hosted, we can change the hooks
- For remote repo which is cloud hosted there we have to deal with access control for stopping users from pushing changes etc.
- If you need to call or perform any action when changes are received then they provide WebHooks.