Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jenkins Pipelines in Continuous Action

Jenkins Pipelines in Continuous Action

The Jenkins pipeline plugin is a good choice for realizing sophisticated continuous delivery pipelines for deploying different kinds of applications. Combined with Kubernetes it offers a premium tool chain for DevOps. On top of that, the versatility of Jenkins Pipelines has inspired us to continuously deliver lots of other things.

The talk takes you through an introductory story over to the basics and concepts of Jenkins Pipelines and finally tries to stir your fantasy by showing how we actually use Jenkins Pipelines.

Oliver Milke

March 12, 2019
Tweet

More Decks by Oliver Milke

Other Decks in Technology

Transcript

  1. // • > 10 Jahre Softwareentwicklung • Software Craftsman @cloudogu

    • JUG Ostfalen • Fitness / Freeletics Oliver Milke Software Craftsman https://twitter.com/OliverMilke About me https://twitter.com/cloudogu Cloudogu GmbH // 2
  2. Intro Jenkins Pipelines - Überblick und Basics Pipeline Show Case

    //Worum geht es heute? Cloudogu GmbH // 3
  3. Cloudogu GmbH // 6 1. Effizienz 2. Qualität 3. Spaß

    TOP 3 gute Gründe für Automatisierung
  4. Cloudogu GmbH // 8 Facts 3,3 Mrd. Transaktion pro Tag

    $21 Mrd. Handelsvolumen pro Tag 17% Handelsanteil an NYSE und NASDAQ $365 Mio. in Cash 31. Juli 2012
  5. Cloudogu GmbH Continuous… ✓ Integration ✓ Delivery ✓ Deployment ✓

    Testing ✓ Inspection ✓ Monitoring ✓ Improvement // 16
  6. Cloudogu GmbH Jenkins 2 Pipeline a.k.a. Pipeline as Code Jenkinsfile

    // 22 https://plugins.jenkins.io/workflow-aggregator https://jenkins.io/doc/book/pipeline/
  7. Cloudogu GmbH Über den Vortrag Begleitende Artikelserie // 24 https://cloudogu.com/en/blog/continuous_delivery_1_basics

    https://cloudogu.com/en/blog/continuous_delivery_2 https://cloudogu.com/en/blog/continuous_delivery_part_3 https://cloudogu.com/en/blog/continuous_delivery_4_en
  8. // Steps & Stages • Teilschritte des Build-Prozesses • scm

    checkout • mvn package • docker build • cubectl apply • sh 'magic' • Logische Gruppierung zu Stages • Build • Test • Deploy Cloudogu GmbH // 26
  9. lange Build Jobs Parallelisierung 1 Agent* n Agents ⚠️ 1

    Workspace ⚠️ Setup Synchronisierung - Beispiel Cloudogu GmbH // 31
  10. Pro Tip #3 Cloudogu GmbH // 33 http://www.cronmaker.com/ CronMaker is

    a utility which helps you to build cron expressions.
  11. Ähnliche Pipelines a.k.a Don‘t Repeat Yourself Wiederverwendung load Shared Lib

    ⚠️ Pipeline Repository ⚠️ Groovy Script Cloudogu GmbH // 34
  12. // Credentials • Secrets niemals ins Jenkinsfile - never •

    eingebaute Sicherheitsbehandlung https://jenkins.io/doc/book/using/using-credentials/ Cloudogu GmbH // 42
  13. Dogus Cloudogu GmbH // 47 Lint Setup Build Integration Tests

    Provision Wait 4 Dependencies Verify Clean Checkout ~ 10 Minuten
  14. demo.cloudogu.net Cloudogu GmbH // 51 Decide Color Apply Demo Content

    Destroy Old Instance Checkout Create New Instance Switch DNS Record ~ 22 Minuten
  15. private CES Demo-Instanzen Cloudogu GmbH // 52 Apply or Destroy

    Demo Content Checkout Verify ~ 3 Minuten
  16. // Wrap Up • Jenkins Pipelines ist Classic Jenkins as

    Code • Steps in Stages inhaltlich gliedern • Code Generator für Neueinsteiger • Don‘t Repeat Yourself • Testautomatisierung gehört dazu • ggf. parallelisieren • Ausführung auf Docker-Build-Agents Cloudogu GmbH // 53
  17. // Wrap Up • Delivery in einer Container-Welt ist einfacher

    • Automatisierung ist extrem wertvoll ☺ • aus Fehlern lernen ist entscheidend Cloudogu GmbH // 54