Jenkins User Conference San Francisco, Oct 2nd 2011 Continuous Deployment with Gerrit and Jenkins R. Tyler Croy Lookout, Inc.

Slides:



Advertisements
Similar presentations
Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Advertisements

Jenkins User Conference San Francisco, Sept #jenkinsconf Business Process Model & Notation (BPMN) Workflows in Jenkins Max Spring Cisco
Jenkins User Conference Jenkins User Conference Israel, 06 June 2013 #jenkinsconf Pre-Tested Commits with Jenkins and Reviewboard Yardena Meymann VMware.
Simple Git Steve Pieper. Topics Git considerations and Slicer Git as if it were svn Git the way it is meant to be.
ENTERPRISE CLOUD DEVELOPMENT CollabNet TeamForge Git Integration Dharmesh Sheta CollabNet Engineering Office Potsdam, Germany History Protection 1.How.
Introduction to Git 2011 F2E Summit Jenny Donnelly, YUI.
Patterns & practices Symposium 2013 Introducing Git version control into your team Mark
Automating Drupal Deployment Dominique De Cooman.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Distributed Version Control. Image stolen from which is really good, go read it.  Old-school version control.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Fundamentals of Git By Zachary Ling 29 th, Aug,
OPNFV DEVELOPER TOOLS.
Created by: Maria Abrahms Modified Date: Classification: How to get it done Contributing to OpenStack.
1 Introductory Notes on the Git Source Control Management Ric Holt, 8 Oct 2009.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
…using Git/Tortoise Git
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Development Environment Matthew Sell, CSSE Student MASS Research Participant, October 2014.
Created by Jan Medved Integration & Test Strategy for Lithium.
Paul McGrath.  Speedy Input  Speedy Visualisation  Speedy Workflow.
Version Control Systems. Version Control Manage changes to software code – Preserve history – Facilitate multiple users / versions.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Page 1 TBD 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy Paris Tél : Fax :
GitHub and the MPI Forum: The Short Version December 9, 2015 San Jose, CA.
Falcons Git Usage Andre Pool Version 2.0 October 2015 / Veldhoven.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
GIT: What, how and why ? Part 1: Basics. What do I know about git? Started using it for experiments on April 2009 Moved all voms development on git on.
Thanks to our Sponsors! Community Sponsor Yearly Sponsor Marquee Sponsor.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Versioning and Automated Weekly Releases.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
GitHub A web-based Git repository hosting service.
GIT: (a)Gentle InTroduction Bruno Bossola. Agenda About version control Concepts Working locally Remote operations Enterprise adoption Q&A.
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
Development process Douglas Schilling Landgraf
Information Systems and Network Engineering Laboratory II
Proposed IT Infrastructure for TOP OS project
11 Version control (part 2)
LECTURE 2: Software Configuration Management
Git Practice walkthrough.
GitHub workflow according to Google
Git branches and remotes
ALICE-Juniors Meeting
Software Engineering for Data Scientists
Macaualy2 Workshop Berkeley 2017
Let’s start with some questions:
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
LECTURE 3: Software Configuration Management
The Big Picture
Getting Started with Contribution to Openstack
Sr. Developer Cloud System - Architecture
Source Code Repository
Git CS Fall 2018.
Version Control System - Git
Paul S Waters Getting Git.
Git started with git: 2018 edition
Version Control with Git
GitHub 101 Using Github and Git for Source Control
Git Fundamentals.
Hop Aboard the Git Train – Transitioning from TFVC
Git Introduction.
Keeping your SQL Code safe
Introduction to The Git Version Control System
Presentation transcript:

Jenkins User Conference San Francisco, Oct 2nd 2011 Continuous Deployment with Gerrit and Jenkins R. Tyler Croy Lookout, Inc. obs

Jenkins User Conference San Francisco, Oct 2nd 2011 Who is this guy?

Jenkins User Conference San Francisco, Oct 2nd 2011 I work here

Jenkins User Conference San Francisco, Oct 2nd /2/114

Jenkins User Conference San Francisco, Oct 2nd /2/115

Jenkins User Conference San Francisco, Oct 2nd /2/116

Jenkins User Conference San Francisco, Oct 2nd 2011 Brief overview of Continuous Deployment Meet Gerrit A Basic Commit-to-Deploy Pipeline Multiple branches with Gerrit + Jenkins The Human Factor Pro-tips/best practices

Jenkins User Conference San Francisco, Oct 2nd 2011 Continuous Deployment

Jenkins User Conference San Francisco, Oct 2nd 2011 What it isn't

Jenkins User Conference San Francisco, Oct 2nd /2/1110

Jenkins User Conference San Francisco, Oct 2nd 2011 What it is

Jenkins User Conference San Francisco, Oct 2nd 2011 Who is using it?

Jenkins User Conference San Francisco, Oct 2nd 2011 Why Code Review?

Jenkins User Conference San Francisco, Oct 2nd 2011 Why Code Review?

Jenkins User Conference San Francisco, Oct 2nd 2011 Meet Gerrit

Jenkins User Conference San Francisco, Oct 2nd /2/1116

Jenkins User Conference San Francisco, Oct 2nd /2/1117 As a code review tool

Jenkins User Conference San Francisco, Oct 2nd /2/1118 As a code review tool

Jenkins User Conference San Francisco, Oct 2nd 2011 As a Git repository server ~ % git checkout -b change-4 Switched to a new branch 'change-4' ~ % git fetch gerrit refs/changes/04/4/1 From gerrit:ttyclock * branch refs/changes/04/4/1 - > FETCH_HEAD ~ % git cherry-pick FETCH_HEAD Finished one cherry-pick. [change-4 1d4351c] Greatly improve the stability of tty-clock 1 files changed, 3 insertions(+), 0 deletions(-) ~ %

Jenkins User Conference San Francisco, Oct 2nd 2011 As a collaboration tool

Jenkins User Conference San Francisco, Oct 2nd 2011 As a collaboration tool

Jenkins User Conference San Francisco, Oct 2nd 2011 As a collaboration tool

Jenkins User Conference San Francisco, Oct 2nd 2011 As a collaboration tool

Jenkins User Conference San Francisco, Oct 2nd 2011 Code Review “Points”

Jenkins User Conference San Francisco, Oct 2nd 2011 Code Review “Points”

Jenkins User Conference San Francisco, Oct 2nd 2011 Changes in Gerrit Change 123 Patchset 1 Patchset 2 Commit 41dbe5 Commit cdeb34

Jenkins User Conference San Francisco, Oct 2nd 2011 Changes in Gerrit Change 123 Patchset 1 Patchset 2 Commit 41dbe5 Commit cdeb34

Jenkins User Conference San Francisco, Oct 2nd /2/1128

Jenkins User Conference San Francisco, Oct 2nd 2011 Developer Workflow

Jenkins User Conference San Francisco, Oct 2nd 2011 The Gerrit Flow gerritupstream dev-adev-b

Jenkins User Conference San Francisco, Oct 2nd 2011 Flow of changes Create Local Branch % git checkout -b topic-branch work Push to Gerrit % git push gerrit HEAD:refs/for/master

Jenkins User Conference San Francisco, Oct 2nd 2011 Flow of changes Create Local Branch % git checkout -b topic-branch work Push to Gerrit % git push gerrit HEAD:refs/for/master

Jenkins User Conference San Francisco, Oct 2nd 2011 Flow of changes Create Local Branch work Push to Gerrit Review Fix commit Upstream repo rejecte d approved/ submitted rebased!

Jenkins User Conference San Francisco, Oct 2nd 2011 Flow of changes Create Local Branch work Push to Gerrit Review Fix commit Upstream repo rejecte d approved/ submitted rebased!

Jenkins User Conference San Francisco, Oct 2nd 2011 Your development workflow in commands git checkout -b local-topic-branch work work work git rebase -i upstream/master # fix up commits git push gerrit HEAD:refs/for/master Create new commits based on reviews git rebase -i upstream/master # squash up git push gerrit HEAD:refs/for/master

Jenkins User Conference San Francisco, Oct 2nd 2011 REBASE IS SCARY (but necessary)

Jenkins User Conference San Francisco, Oct 2nd 2011 How it works AB AB DE C upstream/master local-topic-branch % git rebase upstream/master

Jenkins User Conference San Francisco, Oct 2nd 2011 How it works AB AB DE C upstream/master local-topic-branch C

Jenkins User Conference San Francisco, Oct 2nd 2011 How it works AB AB DE C upstream/master local-topic-branch C % git rebase -i upstream/master Change-Id: Icde43 Change-Id: I51bdc2

Jenkins User Conference San Francisco, Oct 2nd 2011 ~ % git rebase -i origin/master pick e59df21 Greatly improve the stability of tty-clock squash 6c1ffe1 Fix some whitespace [detached HEAD b] Greatly improve the stability of tty-clock 1 files changed, 2 insertions(+), 0 deletions(-) Successfully rebased and updated refs/heads/change-4. ~ %

Jenkins User Conference San Francisco, Oct 2nd 2011 How it works AB AB DE C upstream/master local-topic-branch C Change-Id: Icde43

Jenkins User Conference San Francisco, Oct 2nd 2011 How it works AB AB DE C upstream/master local-topic-branch C Change-Id: Icde43

Jenkins User Conference San Francisco, Oct 2nd 2011 Gerrit Trigger Plugin

Jenkins User Conference San Francisco, Oct 2nd 2011 Creating a role account ~ % ssh gerrit gerrit create-account

Jenkins User Conference San Francisco, Oct 2nd /2/1145 gerrit Jenkins Streamed events over SSH Commands sent over SSH

Jenkins User Conference San Francisco, Oct 2nd /2/1146

Jenkins User Conference San Francisco, Oct 2nd 2011 A simple pipeline

Jenkins User Conference San Francisco, Oct 2nd 2011 Creating a Jenkins “verifier” job

Jenkins User Conference San Francisco, Oct 2nd 2011 Creating a Jenkins “verifier” job

Jenkins User Conference San Francisco, Oct 2nd 2011 Creating a Jenkins “verifier” job

Jenkins User Conference San Francisco, Oct 2nd 2011 Create Local Branch work Push to Gerrit Review Fix commit Upstream repo Flow of changes Verification Job Build Fails! (-1, Not Verified) Success! (+1, Verified)

Jenkins User Conference San Francisco, Oct 2nd 2011 Create Local Branch work Push to Gerrit Review Fix commit Upstream repo Flow of changes Verification Job Build Fails! (-1, Not Verified) Success! (+1, Verified)

Jenkins User Conference San Francisco, Oct 2nd 2011 Deployment gerritupstream dev-adev-b Release Build Release Test Release Deploy

Jenkins User Conference San Francisco, Oct 2nd 2011 Deployment upstream Release Build Release Test Release Deploy Downstream Job Production machines rsync/ cap/ scp/ mvn

Jenkins User Conference San Francisco, Oct 2nd 2011 Deployment upstream Release Build Release Test Release Deploy Downstream Job Production machines rsync/ cap/ scp/ mvn

Jenkins User Conference San Francisco, Oct 2nd 2011 Multiple Branches

Jenkins User Conference San Francisco, Oct 2nd 2011 Creating the branches in Gerrit

Jenkins User Conference San Francisco, Oct 2nd 2011 Creating the branches in Gerrit ~ % git push gerrit release-1.0

Jenkins User Conference San Francisco, Oct 2nd 2011 From the developer point of view ~ % git checkout -b relfix –track upstream/release-1.0 ~ % # work work work ~ % git add/commit ~ % git push gerrit HEAD:refs/for/release- 1.0

Jenkins User Conference San Francisco, Oct 2nd 2011 From the Jenkins point of view

Jenkins User Conference San Francisco, Oct 2nd 2011 From the Jenkins point of view

Jenkins User Conference San Francisco, Oct 2nd 2011

Jenkins User Conference San Francisco, Oct 2nd 2011 The Human Factor

Jenkins User Conference San Francisco, Oct 2nd 2011 Working with changes “in review”

Jenkins User Conference San Francisco, Oct 2nd 2011 Working with “in-review” changes ~ % git checkout -b topic-with-17 ~ % git fetch gerrit refs/changes/17/17/1 ~ % git cherry-pick FETCH_HEAD ~ % # work work commit work work commit

Jenkins User Conference San Francisco, Oct 2nd 2011 Working with “in-review” changes AB C1 AB DE Developer 1 Developer 2

Jenkins User Conference San Francisco, Oct 2nd 2011 Working with “in-review” changes AB C2 AB C1DE Developer 1 Developer 2

Jenkins User Conference San Francisco, Oct 2nd 2011 Working with “in-review” changes AB AB C1DE Upstream Developer 2 BC2

Jenkins User Conference San Francisco, Oct 2nd 2011 Working with “in-review” changes ~ $ git rebase gerrit/master First, rewinding head to replay your work on top of it... Applying: Unused variable Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging ttyclock.c CONFLICT (content): Merge conflict in ttyclock.c Failed to merge in the changes. Patch failed at 0001 Unused variable When you have resolved this problem run "git rebase -- continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort". ~ $ git rebase --skip HEAD is now at edff388 Unused variable Applying: Local change ~ $

Jenkins User Conference San Francisco, Oct 2nd 2011 Working with “in-review” changes AB AB DE Upstream Developer 2 C2

Jenkins User Conference San Francisco, Oct 2nd 2011 Picking up changes AB C1 AB Developer 1 Developer 2

Jenkins User Conference San Francisco, Oct 2nd 2011 Picking up changes AB C1 AB C2 Developer 1 Developer 2

Jenkins User Conference San Francisco, Oct 2nd 2011 Performing manual verification by QA

Jenkins User Conference San Francisco, Oct 2nd 2011 Manual verification

Jenkins User Conference San Francisco, Oct 2nd /2/1175 Kick-off deployments with the Promoted Builds plugin

Jenkins User Conference San Francisco, Oct 2nd /2/1176

Jenkins User Conference San Francisco, Oct 2nd /2/1177

Jenkins User Conference San Francisco, Oct 2nd 2011 Pro Tips

Jenkins User Conference San Francisco, Oct 2nd 2011 Use “squash” or “fixup” to condense changes

Jenkins User Conference San Francisco, Oct 2nd 2011 Create per-topic/ticket local branches for clearer isolation of work

Jenkins User Conference San Francisco, Oct 2nd 2011 Multiple jobs with the same trigger criteria

Jenkins User Conference San Francisco, Oct 2nd 2011 Investigate the EC2 plugin for burstable testing capacity

Jenkins User Conference San Francisco, Oct 2nd 2011 Gotchas and Errata

Jenkins User Conference San Francisco, Oct 2nd /2/1184

Jenkins User Conference San Francisco, Oct 2nd 2011 “Dependencies” in Gerrit

Jenkins User Conference San Francisco, Oct 2nd 2011 “Dependencies” in Gerrit

Jenkins User Conference San Francisco, Oct 2nd 2011 “Dependencies” in Gerrit

Jenkins User Conference San Francisco, Oct 2nd 2011 Final Thoughts

Jenkins User Conference San Francisco, Oct 2nd 2011 Final Thoughts

Jenkins User Conference San Francisco, Oct 2nd 2011 Final Thoughts

Jenkins User Conference San Francisco, Oct 2nd 2011 Final Thoughts

Jenkins User Conference San Francisco, Oct 2nd 2011 Final Thoughts

Jenkins User Conference San Francisco, Oct 2nd 2011 Thank You To Our Sponsors

Jenkins User Conference San Francisco, Oct 2nd /2/1194 Q&A and Links Gerrit: Gerrit Trigger Plugin: These slides (w/ notes):