DevOps Classroomnotes 11/Mar/2023

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
    Preview
    Preview
  • Lets configure C as Downstream of B
    Preview
    Preview
    Preview
  • Overview
    Preview
  • 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

Preview

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
    Preview
  • In .git folder you have hooks folder
    Preview
  • 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.
    Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube