DevOps Classroomnotes 07/Mar/2023

Jenkins Project Types

  • Free Style
  • Pipeline
  • Maven Project
  • Multi Configuration:
    • For building projects which have different configurations for different environments such as linux, windows, mac etc
  • Multi branch:
    • This is used for project where we have different branches and each branch has different pipeline.

Multi Branch Demo

  • Lets push all the branches after creating 4 branches
    Preview
  • Create a new multi branch project for spring petclinic
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
  • We have pushed the changes to multibranch pipeline
    Preview
  • Every language has some extra folders generated which might not be required in the git repository.
  • For the git to ignore these we create a .gitignore and add the patterns to exclude from git
  • Refer Here for online generator
  • Terraform generates some additional folders like .terraform which needs to be ignored, lets view at .gitignore of terraform
# Created by https://www.toptal.com/developers/gitignore/api/terraform
# Edit at https://www.toptal.com/developers/gitignore?templates=terraform

### Terraform ###
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc

# End of https://www.toptal.com/developers/gitignore/api/terraform

Git Tags

  • Branch and Tags are reference objects in Git
  • Branch points to a commit which changes (generally points to latest commit). Git Tag points to a commit which represents something to be recorded (beta release, customer release)
  • Tags are widely used to represent releases
  • Lets create and push tag
    Preview
    Preview
  • Refer Here to know more on tags

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner