DevOps Classroomnotes 01/Mar/2023

Pipeline as Code (PAC)

  • Pipeline as a code allows us to define CI/CD in a text document in any version control system
  • CI/CD Pipeline when expressed as PAC will be present in git.
  • Jenkins has started supporting Pipelines with
    • Scripted Pipelines
    • Declartive Pipelines

Scripted Pipelines

  • A pipeline can be defined in any file but Jenkinsfile is most widely used name.
  • The structure of Pipeline in scripted is as shown below
    Preview
  • Jenkins will have a set of steps which will be part of default jenkins installation and rest of steps can be added to jenkins by installing plugins
  • Jenkins Pipeline steps reference Refer Here
  • Lets build a scripted pipeline for game of life
  • Step: Clone the code using git pipeline Refer Here
  • Refer Here for changes
  • Create a new job and select pipleline from scm
    Preview
    Preview
    Preview
  • Build the pipeline and you should be able to see the stage wise logs.
  • Refer Here for the next set of changes.
  • Build the project and view the project post refresh after success
    Preview

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner