DevOps Classroom notes 27/Nov/2023

Pipeline as Code

  • This approach is defining steps required for building CI/CD expressed as a code in version control system.
  • Advantages:
    • Changes done in pipeline over a period of time will have history in git.
    • Per branch i can different build steps
    • It also allows to create reusability
  • Jenkins started doing Pipeline as code with Scripted Pipelines and then they have also provided Declarative Pipelines
  • Scripted Pipeline:
    • This is the Pipeline expressed in groovy language.
    • These pipelines are very much useful if your CI/CD pipeline has complex steps.
  • Declartive Pipeline:
    • This pipeline is expressed in the form of Jenkins DSL (Domain Specific Language) which internally uses groovy.
    • This has been implemented to reduce the learning curve.
  • The Pipeline as Code in Jenkins can be expressed in any file but file with name Jenkinsfile is commonly used.
  • Refer Here for official docs

Declartive Pipelines in Jenkins

Spring pet clinic day build in Declarative Pipleine

  • Refer Here for the pipeline.
  • Now lets create a Jenkins Pipeline Project


  • Now lets trigger a manual build
  • Refer Here for the steps added to publish test results and archive the artifacts
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%