SlideShare a Scribd company logo
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Continuous Integration
with Gitlab
Presented by: Andrew Farley
farley@olindata.com
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
Slide
DevOps, Done Right
• Senior DevOps Engineer and Consultant for OlinData
• Specializing in high-scalability engineering on the cloud
• Is an AWS Certified Solutions Architect
• Author and co-author of over 30 iPhone apps and games
• Passionate about open-source and knowledge-sharing
Who am I?
2
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
• What is Continuous Integration (CI)?
• Why CI?
• Introduction to Gitlab
• Some ways to use CI
• Your first build with GitLab
• Demo
• Questions?
Overview
3
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
• Continuous Integration, or CI, is the practice of “integrating” regularly to prevent
merge and code quality problems from occurring to help identify problems early
during development
• Not required but highly desirable with multiple developers
• “Integration” means more than simply able to merge the code
• It can include but is not limited to…
• Lint (syntax) checks
• Ensuring the code compiles/builds (for compiled languages)
• Enforcing code quality requirements
• Running automated unit tests
• Enforcing minimum performance requirements
• Generating automated documentation
• Performing continuous delivery
• Triggering activities after success or failure such as automated
deployments
What is Continuous Integration?
4
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
• In practice, CI-related tasks are initiated off after pushing code to a remote
source control server, such as…
• GitHub (https://github.com)
• GitLab (https://gitlab.com)
• BitBucket (https://bitbucket.org)
• SourceForge (https://sourceforge.net)
• There are various managed / SaaS CI providers that integrate with a number
of the above services including…
• CircleCI (https://circleci.com)
• TravisCI (https://travis-ci.org)
• And there are managed solutions to do the same if you have legal or
security reasons to not be able to ship your code to a SaaS provider
• Jenkins (https://jenkins.io/)
• Hudson (http://hudson-ci.org)
Continuous Integration continued…
5
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
What is GitLab?
6
https://gitlab.com
NOTE: OlinData and the presenter are not a client or partner of GitLab Inc., merely a fellow consumer and active user of their platform
• GitLab is an open-source managed
Source Code Management (SCM)
Repository
• GitLab is a cloud-hosted or managed
alternative to GitHub, though typically hosted on your own server.
• Their feature-sets are comparable, especially with Enterprise GitLab.
• Ideal for customers with legal reasons to keep their code off SaaS and
cloud-based SCM solutions like GitHub.
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
Typical CI Workflow
7
Multiple Developers/Teams
Push Code
SCM System Receives
Code, Initiates CI
CI Builds Project
(if necessary)
Automated Tests Occur
Report (failed) Results to team via
Email or other integrations (eg: Slack)
If necessary,
fix failing builds
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
Gradual CI Adoption
8
Bug
Reported
Developers
Fix Bug +
Test Case
Continuous
Integration
• Without CI currently on your system, you can gradually begin to add CI even while in a maintenance mode.
• Every time you fix a bug, write a test to ensure that bug does not occur again.
• Example: Users can sign up for a website with a space in front of their email address or name, which
then leads to confusion when they can not login to a system.
• #1: Fix the bug (however you might fix it, either by stripping the newlines, or by rejecting the user
input)
• #2: Write a test case using the right tool (in this case, possibly Selenium) to verify that the input
fields and form only accept the valid input.
• With this in place as your system continues to evolve and change you can be sure new code any current or
future developer writes will not cause that same bug to emerge again.
Deploy
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
• Instead of wasting tons of time
performing QA at or after deploying
new code, you can make QA part of the
development process.
• Enforcing code-style guidelines makes
it easier for developers to work together
and take over for one-another, and
makes it easier for new developers.
• Allows your developers to find
problems early during their
development, making debugging and
deployment much easier.
Why CI?
9
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
Continuous Integration Uses
10
• Ensuring that code compiles and executes properly
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
Continuous Integration Uses
11
• Ensuring the code follows your code style or compliance rules
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
Continuous Integration Uses
12
• Code passes a series of unit tests and ensuring minimum performance
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
• Assuming you have gitlab setup, you still need to setup a “runner” to be able to execute your builds.
• Runner can be on the Gitlab server or on a throwaway server on a cloud-provider
• You’ll want to follow the install instructions from https://gitlab.com/gitlab-org/gitlab-ci-multi-runner
• You’ll also need your token runner token from: https://YOURGITLABURL/admin/runners
Prepare For Your First Build
13
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
• All you need to do now, assuming your project is already in gitlab, is
add a “.gitlab-ci.yml” file.
• For more about this file, please refer to the official documentation:
http://doc.gitlab.com/ee/ci/yaml/README.html
Your First Build
14
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Slide
Demo
15
https://github.com/olindata/sample-gitlabci-ruby-project
or
https://github.com/olindata/sample-gitlabci-cpp-project
Demo Projects
Continuous Integration with Gitlab
Presented By: Farley
olindata.com
April 5, 2016
DevOps, Done Right
Thanks!
Questions?
Ask them now, or…
http://olindata.com
farley@olindata.com
All trademarks, service marks, trade names, trade dress, product names and logos appearing
on this presentation are the property of their respective owners. All rights reserved.

More Related Content

What's hot (20)

PDF
Introducing GitLab (June 2018)
Noa Harel
 
PDF
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
PPTX
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
PPTX
GitLab for CI/CD process
HYS Enterprise
 
PPTX
Up GitLab Presentation 2015
Kumaran Balachandran
 
PDF
CI with Gitlab & Docker
Joerg Henning
 
PDF
Gitlab ci, cncf.sk
Juraj Hantak
 
PDF
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
 
PDF
Continuous Deployment with Kubernetes, Docker and GitLab CI
alexanderkiel
 
PPTX
GitLab 8.6 - Release Webcast
GitLab, Inc
 
PDF
GitLab Frontend and VueJS at GitLab
Fatih Acet
 
PDF
GITS Class #16: CI/CD (Continuous Integration & Continuous Deployment) with G...
GITS Indonesia
 
PPTX
CI/CD with Rancher CLI + Jenkins
Go Chiba
 
PDF
Introduction to GitHub Actions
Knoldus Inc.
 
PPT
Flash Camp Chennai - Build automation of Flex and AIR applications
RIA RUI Society
 
KEY
Travis CI
bsiggelkow
 
PPTX
Supercharging CI/CD with GitLab and Rancher - June 2017 Online Meetup
Shannon Williams
 
PPTX
2015 05-06-karsten gaebert-akademie-etrainings
Haufe-Lexware GmbH & Co KG
 
PDF
Code review vs pull request
Bryan Liu
 
PPTX
CI/CD with GitHub Actions
Swaminathan Vetri
 
Introducing GitLab (June 2018)
Noa Harel
 
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
GitLab for CI/CD process
HYS Enterprise
 
Up GitLab Presentation 2015
Kumaran Balachandran
 
CI with Gitlab & Docker
Joerg Henning
 
Gitlab ci, cncf.sk
Juraj Hantak
 
Devops Porto - CI/CD at Gitlab
Filipa Lacerda
 
Continuous Deployment with Kubernetes, Docker and GitLab CI
alexanderkiel
 
GitLab 8.6 - Release Webcast
GitLab, Inc
 
GitLab Frontend and VueJS at GitLab
Fatih Acet
 
GITS Class #16: CI/CD (Continuous Integration & Continuous Deployment) with G...
GITS Indonesia
 
CI/CD with Rancher CLI + Jenkins
Go Chiba
 
Introduction to GitHub Actions
Knoldus Inc.
 
Flash Camp Chennai - Build automation of Flex and AIR applications
RIA RUI Society
 
Travis CI
bsiggelkow
 
Supercharging CI/CD with GitLab and Rancher - June 2017 Online Meetup
Shannon Williams
 
2015 05-06-karsten gaebert-akademie-etrainings
Haufe-Lexware GmbH & Co KG
 
Code review vs pull request
Bryan Liu
 
CI/CD with GitHub Actions
Swaminathan Vetri
 

Viewers also liked (8)

PDF
Gitlab Training with GIT and SourceTree
Teerapat Khunpech
 
PDF
FOSDEM 2017: GitLab CI
OlinData
 
PDF
How to use any static site generator with GitLab Pages.
Ivan Nemytchenko
 
PDF
継続的デリバリーを支える開発環境
智治 長沢
 
PPTX
Coherenceを利用するときに気をつけること #OracleCoherence
Toshiaki Maki
 
PPT
Ci Tranning
Cương Hỏa
 
PDF
jenkinsのすゝめ - 継続的インテグレーションと継続的デリバリー
Junya Suzuki
 
PPTX
GitFlow, SourceTree and GitLab
Shinu Suresh
 
Gitlab Training with GIT and SourceTree
Teerapat Khunpech
 
FOSDEM 2017: GitLab CI
OlinData
 
How to use any static site generator with GitLab Pages.
Ivan Nemytchenko
 
継続的デリバリーを支える開発環境
智治 長沢
 
Coherenceを利用するときに気をつけること #OracleCoherence
Toshiaki Maki
 
Ci Tranning
Cương Hỏa
 
jenkinsのすゝめ - 継続的インテグレーションと継続的デリバリー
Junya Suzuki
 
GitFlow, SourceTree and GitLab
Shinu Suresh
 
Ad

Similar to Webinar - Continuous Integration with GitLab (20)

PDF
What is Continuous Integration_ - A Comprehensive Guide.pdf
kalichargn70th171
 
PPTX
Lets talk about CI CD Pipeline in Agile
Poonam Panday
 
ODP
Continous integration
Jeremy Wilken
 
PDF
Continuous Integration (CI) - An effective development practice
Dao Ngoc Kien
 
PDF
Introduction to Continuous Integration
Hùng Nguyễn Huy
 
PDF
A Ci Experience
Umut IŞIK
 
PDF
Flight East 2018 Presentation–Continuous Integration––An Overview
Synopsys Software Integrity Group
 
PPTX
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
eleksdev
 
PDF
Let’s start Continuous Integration with jenkins
Tomohide Kakeya
 
PPT
Continuous Integration
Joseph Wang
 
PDF
Continuous integration (eng)
Anatoliy Okhotnikov
 
PDF
Introducing GitLab (September 2018)
Noa Harel
 
DOCX
Continuous Integration
Chandra Sabbavarpu
 
PPTX
Continuos Delivery
Andrés Callejas González
 
PPTX
Continuous Integration
Vijaya K
 
PDF
Magenic-White-Paper-Continuous-Inegration-for-QA-Teams
Aaron Humerickhouse
 
PDF
Putting the pro in programmer
Switch Systems Ltd
 
PDF
Introducing GitLab (September 2018)
Noa Harel
 
PPTX
Advanced Continuous Integration - PyGrunn 2014 - Dirk Zittersteyn
Dirk Zittersteyn
 
PPTX
Continuous integration for se group meeting
Sergii Shmarkatiuk
 
What is Continuous Integration_ - A Comprehensive Guide.pdf
kalichargn70th171
 
Lets talk about CI CD Pipeline in Agile
Poonam Panday
 
Continous integration
Jeremy Wilken
 
Continuous Integration (CI) - An effective development practice
Dao Ngoc Kien
 
Introduction to Continuous Integration
Hùng Nguyễn Huy
 
A Ci Experience
Umut IŞIK
 
Flight East 2018 Presentation–Continuous Integration––An Overview
Synopsys Software Integrity Group
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
eleksdev
 
Let’s start Continuous Integration with jenkins
Tomohide Kakeya
 
Continuous Integration
Joseph Wang
 
Continuous integration (eng)
Anatoliy Okhotnikov
 
Introducing GitLab (September 2018)
Noa Harel
 
Continuous Integration
Chandra Sabbavarpu
 
Continuos Delivery
Andrés Callejas González
 
Continuous Integration
Vijaya K
 
Magenic-White-Paper-Continuous-Inegration-for-QA-Teams
Aaron Humerickhouse
 
Putting the pro in programmer
Switch Systems Ltd
 
Introducing GitLab (September 2018)
Noa Harel
 
Advanced Continuous Integration - PyGrunn 2014 - Dirk Zittersteyn
Dirk Zittersteyn
 
Continuous integration for se group meeting
Sergii Shmarkatiuk
 
Ad

More from OlinData (20)

PDF
AWS Cost Control: Cloud Custodian
OlinData
 
PPTX
Introduction to 2FA on AWS
OlinData
 
PDF
AWS Data Migration case study: from tapes to Glacier
OlinData
 
PDF
Issuing temporary credentials for my sql using hashicorp vault
OlinData
 
PDF
Log monitoring with Logstash and Icinga
OlinData
 
PDF
Cfgmgmtcamp 2017 docker is the new tarball
OlinData
 
PDF
Icinga 2 and Puppet - Automate Monitoring
OlinData
 
PPTX
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
OlinData
 
PDF
Webinar - High Availability and Distributed Monitoring with Icinga2
OlinData
 
PPTX
Webinar - Windows Application Management with Puppet
OlinData
 
PDF
Webinar - Centralising syslogs with the new beats, logstash and elasticsearch
OlinData
 
PDF
Icinga 2 and puppet: automate monitoring
OlinData
 
PDF
Webinar - Project Management for DevOps
OlinData
 
PDF
Using puppet in a traditional enterprise
OlinData
 
PDF
Webinar - PuppetDB
OlinData
 
PDF
Webinar - Scaling your Puppet infrastructure
OlinData
 
PDF
Webinar - Managing your Docker containers and AWS cloud with Puppet
OlinData
 
PDF
Webinar - Manage user, groups, packages in windows using puppet
OlinData
 
PDF
1 m+ qps on mysql galera cluster
OlinData
 
PDF
Workshop puppet (dev opsdays ams 2015)
OlinData
 
AWS Cost Control: Cloud Custodian
OlinData
 
Introduction to 2FA on AWS
OlinData
 
AWS Data Migration case study: from tapes to Glacier
OlinData
 
Issuing temporary credentials for my sql using hashicorp vault
OlinData
 
Log monitoring with Logstash and Icinga
OlinData
 
Cfgmgmtcamp 2017 docker is the new tarball
OlinData
 
Icinga 2 and Puppet - Automate Monitoring
OlinData
 
Webinar - Auto-deploy Puppet Enterprise: Vagrant and Oscar
OlinData
 
Webinar - High Availability and Distributed Monitoring with Icinga2
OlinData
 
Webinar - Windows Application Management with Puppet
OlinData
 
Webinar - Centralising syslogs with the new beats, logstash and elasticsearch
OlinData
 
Icinga 2 and puppet: automate monitoring
OlinData
 
Webinar - Project Management for DevOps
OlinData
 
Using puppet in a traditional enterprise
OlinData
 
Webinar - PuppetDB
OlinData
 
Webinar - Scaling your Puppet infrastructure
OlinData
 
Webinar - Managing your Docker containers and AWS cloud with Puppet
OlinData
 
Webinar - Manage user, groups, packages in windows using puppet
OlinData
 
1 m+ qps on mysql galera cluster
OlinData
 
Workshop puppet (dev opsdays ams 2015)
OlinData
 

Recently uploaded (20)

PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
July Patch Tuesday
Ivanti
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 

Webinar - Continuous Integration with GitLab

  • 1. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Continuous Integration with Gitlab Presented by: Andrew Farley [email protected]
  • 2. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 Slide DevOps, Done Right • Senior DevOps Engineer and Consultant for OlinData • Specializing in high-scalability engineering on the cloud • Is an AWS Certified Solutions Architect • Author and co-author of over 30 iPhone apps and games • Passionate about open-source and knowledge-sharing Who am I? 2
  • 3. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide • What is Continuous Integration (CI)? • Why CI? • Introduction to Gitlab • Some ways to use CI • Your first build with GitLab • Demo • Questions? Overview 3
  • 4. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide • Continuous Integration, or CI, is the practice of “integrating” regularly to prevent merge and code quality problems from occurring to help identify problems early during development • Not required but highly desirable with multiple developers • “Integration” means more than simply able to merge the code • It can include but is not limited to… • Lint (syntax) checks • Ensuring the code compiles/builds (for compiled languages) • Enforcing code quality requirements • Running automated unit tests • Enforcing minimum performance requirements • Generating automated documentation • Performing continuous delivery • Triggering activities after success or failure such as automated deployments What is Continuous Integration? 4
  • 5. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide • In practice, CI-related tasks are initiated off after pushing code to a remote source control server, such as… • GitHub (https://github.com) • GitLab (https://gitlab.com) • BitBucket (https://bitbucket.org) • SourceForge (https://sourceforge.net) • There are various managed / SaaS CI providers that integrate with a number of the above services including… • CircleCI (https://circleci.com) • TravisCI (https://travis-ci.org) • And there are managed solutions to do the same if you have legal or security reasons to not be able to ship your code to a SaaS provider • Jenkins (https://jenkins.io/) • Hudson (http://hudson-ci.org) Continuous Integration continued… 5
  • 6. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide What is GitLab? 6 https://gitlab.com NOTE: OlinData and the presenter are not a client or partner of GitLab Inc., merely a fellow consumer and active user of their platform • GitLab is an open-source managed Source Code Management (SCM) Repository • GitLab is a cloud-hosted or managed alternative to GitHub, though typically hosted on your own server. • Their feature-sets are comparable, especially with Enterprise GitLab. • Ideal for customers with legal reasons to keep their code off SaaS and cloud-based SCM solutions like GitHub.
  • 7. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide Typical CI Workflow 7 Multiple Developers/Teams Push Code SCM System Receives Code, Initiates CI CI Builds Project (if necessary) Automated Tests Occur Report (failed) Results to team via Email or other integrations (eg: Slack) If necessary, fix failing builds
  • 8. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide Gradual CI Adoption 8 Bug Reported Developers Fix Bug + Test Case Continuous Integration • Without CI currently on your system, you can gradually begin to add CI even while in a maintenance mode. • Every time you fix a bug, write a test to ensure that bug does not occur again. • Example: Users can sign up for a website with a space in front of their email address or name, which then leads to confusion when they can not login to a system. • #1: Fix the bug (however you might fix it, either by stripping the newlines, or by rejecting the user input) • #2: Write a test case using the right tool (in this case, possibly Selenium) to verify that the input fields and form only accept the valid input. • With this in place as your system continues to evolve and change you can be sure new code any current or future developer writes will not cause that same bug to emerge again. Deploy
  • 9. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide • Instead of wasting tons of time performing QA at or after deploying new code, you can make QA part of the development process. • Enforcing code-style guidelines makes it easier for developers to work together and take over for one-another, and makes it easier for new developers. • Allows your developers to find problems early during their development, making debugging and deployment much easier. Why CI? 9
  • 10. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide Continuous Integration Uses 10 • Ensuring that code compiles and executes properly
  • 11. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide Continuous Integration Uses 11 • Ensuring the code follows your code style or compliance rules
  • 12. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide Continuous Integration Uses 12 • Code passes a series of unit tests and ensuring minimum performance
  • 13. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide • Assuming you have gitlab setup, you still need to setup a “runner” to be able to execute your builds. • Runner can be on the Gitlab server or on a throwaway server on a cloud-provider • You’ll want to follow the install instructions from https://gitlab.com/gitlab-org/gitlab-ci-multi-runner • You’ll also need your token runner token from: https://YOURGITLABURL/admin/runners Prepare For Your First Build 13
  • 14. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide • All you need to do now, assuming your project is already in gitlab, is add a “.gitlab-ci.yml” file. • For more about this file, please refer to the official documentation: http://doc.gitlab.com/ee/ci/yaml/README.html Your First Build 14
  • 15. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Slide Demo 15 https://github.com/olindata/sample-gitlabci-ruby-project or https://github.com/olindata/sample-gitlabci-cpp-project Demo Projects
  • 16. Continuous Integration with Gitlab Presented By: Farley olindata.com April 5, 2016 DevOps, Done Right Thanks! Questions? Ask them now, or… http://olindata.com [email protected] All trademarks, service marks, trade names, trade dress, product names and logos appearing on this presentation are the property of their respective owners. All rights reserved.