http://slides.com/tennisbear/jenkins-sch

Jenkins: Advanced Pipelining and Bitbucket/S3 Integrations

Jenkins: Advanced Pipelining and Bitbucket/S3 Integrations

Who Am I?

  • Dennis Slade Jr.
    dslade@scholastic.com
     
  • 23+ years experience in web & desktop applications, software support, and training
     
  • B.A. in Computer Science from Vassar College
     
  • 30+ years providing tech support to Mom

What is Jenkins?

Jenkins is an open source automation server which supports the building, deploying and automating of any project.

 

Jenkins is famous for being a continuous integration/delivery (CI/CD) server, but it is more than that.

How our team uses Jenkins

Code and config deploys in dev, stage, upd and perf environments (automated and manual)

 

Unit test and SonarQube coverage

 

Deploys to live/production

Jenkins: Basic/Sandbox

Installed locally

 

No security (anonymous user)

 

No organization of jobs

 

“Freestyle” jobs using GUI elements

 

Complex functionality through plugins GUI

Jenkins: Intermediate

Installed in the cloud or shared terrestrial server

 

Basic security (single user)

 

Jobs organized by name and tabs

 

Mostly “freestyle” jobs made with the GUI

Some pipeline scripts in the mix

 

Basic parameterization and job chaining

Jenkins: Advanced

Installed in the cloud

 

Solid security (multiple users/roles)

 

Jobs organized by name, tabs (maintained by regex), environment

 

Most jobs pipelines scripts, reusable between jobs

 

Using more complex plugins

Tab Views by Regex

Where do things run in Jenkins?

It’s the server not the client

 

Using each project’s Workspace

 

On a Jenkins server shared installations benefit all  jobs

Pipeline Scripts are Groovy

"Groovy is an optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax." [*]

 

It's basically Java-lite.

Git/Bitbucket and Jenkins:
Perfect Together

You gain much by pulling Groovy pipeline scripts from a Bitbucket repo:

 

  1. One script, many jobs
  2. Versioning and change tracking
  3. Visibility of scripts beyond Jenkins, team
  4. Test changes on branches before “going” live
  5. Leverage Bitbucket pull requests for code reviews

Making scripts reusable in multiple environments / projects

  • Multiple environment logic in a single script
     
  • Job parameters
     
  • Job name to drive multiple behaviors
     
  • Job descriptions (history)

Parameterization & Job Triggering 

Add to the flexibility and functionality of your jobs by adding parameters and having jobs trigger each other

 

Parameters can be user selected, passed in by another job, predefined by job, default by environment variable

 

Job triggering allows a job to be invoked manually or as part of one or more CI/CD processes.

Integrating S3 uploads and downloads into your pipelines

Install S3 command line tools as shared on your Jenkins installation.

 

Use SCM git polling to trigger uploads into S3 based on the file locations of changed files.

 

Pipeline AWS plugin

Useful Plugins

Links

Thanks for listening!

Dennis Slade Jr.
• Mail: dslade@scholastic.com
• Twitter: @DennisSladeJr

 

This presentation on Slides.com:

http://slides.com/tennisbear/jenkins-sch

 

Jenkins: Advanced Pipelining and Bitbucket/S3 Integrations

By Dennis Slade Jr.

Jenkins: Advanced Pipelining and Bitbucket/S3 Integrations

Why you should be pulling all of your pipeline scripts from Bitbucket? How can you make your scripts easily reusable in multiple environments and for multiple projects? Integrating S3 uploads and downloads into your pipelines How can parameterization and script chaining add to the utility of your Jenkins jobs?

  • 513
Loading comments...

More from Dennis Slade Jr.