Slide 1

Slide 1 text

EVERYONE CAN CONTRIBUTE

Slide 2

Slide 2 text

about.gitlab.com Monthly release New features Open Development Direction Strategy Collaborate on code. Issues, Merge Requests, Code Review Continuous Integration Deploy! Community Edition Open Source (MIT License) On premises or GitHost.io Enterprise Edition +Options On premises or GitHost.io GitLab.com Free and unlimited Public and private! SaaS Enterprise Edition

Slide 3

Slide 3 text

In this webcast • GitLab CI overview • How GitLab CI works • Live demos: • Configuring CI for testing • Configuring a Specific Runner • Reviewing your work; builds and artifacts • The roadmap • Resources to get started Heather Developer Marketing

Slide 4

Slide 4 text

Tip: Watching us on GNU/Linux? Try Chromium. • Recording and Slides will be available! • Keep an eye on our blog and newsletter about.gitlab. com/contact

Slide 5

Slide 5 text

Introduction to GitLab CI

Slide 6

Slide 6 text

@ayufanpl @GrzegorzBizon @TomaszMaczukin

Slide 7

Slide 7 text

Introduction to GitLab CI Kamil

Slide 8

Slide 8 text

Group What is GitLab? Project Issue Tracker Discuss, plan, assign, organize. Merge Requests Same as above, plus line by line code review, testing and merging. Git Repository Work from the command line or the UI GitLab CI Test your builds before you merge.

Slide 9

Slide 9 text

Continuous Integration is a software development practice where members of a team integrate their work frequently... verified by an automated build (including test) to detect integration errors -- Martin Fowler on Continuous Integration

Slide 10

Slide 10 text

What is CI? Your Development Team Push to Central Repository Build and test (CI) Review and merge

Slide 11

Slide 11 text

What’s next? Your Development Team Push to Central Repository Build and test (CI) Production (Deployment) Staging (Delivery) ➔ Continuous Delivery ➔ Continuous Deployment

Slide 12

Slide 12 text

Configuration as Code ● Versioned tests: a .gitlab-ci.yml file that contains your tests, allowing everyone to contribute changes and ensuring every branch gets the tests it needs ● We are developers, we prefer to write, focus on content, because this is natural for us :)

Slide 13

Slide 13 text

.gitlab-ci.yml image: ruby before_script: - bundle install test:rspec: script: - bundle exec rspec test:rubocop: script: - bundle exec rubocop

Slide 14

Slide 14 text

What can you do with CI on GitLab? ➔ Build packages ➔ Run test suites ➔ Deploy new code once tests pass ➔ Use for any language and framework ➔ Use on any platform ➔ Use for mobile and embedded development ➔ Use on ARM and Raspberry PI

Slide 15

Slide 15 text

Architecture GitLab Laptop VM VM

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Other CI tools? ➔ Jenkins integration? ◆ Status display on the dashboard, such as project list, project landing page, status of commits, merge request but not the build log. ➔ With other CI services some of this won’t work. ➔ (Link to documentation describing other services)?

Slide 25

Slide 25 text

Which services work with CI? ➔ Atlassian Bamboo CI ➔ Drone CI ➔ Jenkins CI ➔ JetBrains Team City CI doc.gitlab.com/ce/project_services/project_services.html

Slide 26

Slide 26 text

Any questions about configuring GitLab CI so far? Demos coming next! We’ll answer what we can and follow up via email after! Watching the recording? about.gitlab.com/getting-help

Slide 27

Slide 27 text

Demo: Configuring CI Grzegorz

Slide 28

Slide 28 text

What we will do in this demo ➔ Create an example Ruby project using TDD ➔ Use RSpec test harness ➔ Configure CI environment for it on gitlab.com ➔ Prepare very basic `gitlab-ci.yml` file ➔ See what happens after a Git push

Slide 29

Slide 29 text

What we just saw How to configure your project with Continuous Integration on GitLab. com. You can apply the same workflow on your on-premises of GitLab Community Edition installation, using your own compute nodes to install GitLab Runners on!

Slide 30

Slide 30 text

Any questions about the demo configuring CI? We’ll answer what we can and follow up via email after! Watching the recording? about.gitlab.com/getting-help

Slide 31

Slide 31 text

Demo: Specific Runners Tomasz

Slide 32

Slide 32 text

What we did in this demo ➔ Installed GitLab Runner on a fresh virtual machine with Debian ➔ Registered the Runner in a project created earlier ➔ Disabled shared Runners for the project ➔ Re-executed last build so it was run on our new Runner ➔ Started our Runner to process the build

Slide 33

Slide 33 text

Why would I need my own Runner? On GitLab.com, for example, you can use shared runners. But sometimes shared runners aren’t good solution, for example: ➔ you need to compile the software for Windows or OS X, not for linux ➔ you are creating some confidential data during the build so you need to have them on your infrastructure Happily with GitLab CI you can do it!

Slide 34

Slide 34 text

Which Operating Systems? Supported platforms: i386, amd64, arm Supported OS: ➔ GNU/Linux ➔ Windows ➔ OS X ➔ FreeBSD DEB/RPM packages

Slide 35

Slide 35 text

Compare Docker vs Shell? Shell ● Easiest to install and use ● Uses host environment ● Less secure - different projects can access each other working directories Docker ● More powerful ● Separates build environment ● Use predefined images with required software, libraries etc. (or build your own) ● Works only for GNU/Linux (as for now)

Slide 36

Slide 36 text

Autoscaling ● Introduced in GitLab Runner 1.1 ● Uses Docker Machine (so it’s limited to GNU/Linux right now) ● It’s integrated with most popular cloud providers and you can always provide your own driver ● Made to speed up your builds and utilize your build infrastructure (and costs)

Slide 37

Slide 37 text

Any questions about configuring Specific Runners? We’ll answer what we can and follow up via email after! Watching the recording? about.gitlab.com/getting-help

Slide 38

Slide 38 text

Reviewing your work in CI - Kamil

Slide 39

Slide 39 text

Build artifacts (.gitlab-ci.yml) build: stage: build script: - make build artifacts: paths: - binaries/

Slide 40

Slide 40 text

Pipeline stages: - build - test build: stage: build script: make build test: stage: test script: make test

Slide 41

Slide 41 text

Parallel builds test1: stage: test script: - make test1 test2: stage: test script: - make test2

Slide 42

Slide 42 text

Docker support image: ruby:2.1 services: - mysql rspec: script: - rspec

Slide 43

Slide 43 text

Pages ➔ Create websites for your GitLab projects, groups, or user account ➔ Use any static website generator ➔ Use GitLab CI to generate your Pages ➔ Use own domain and SSL http://pages.gitlab.io/ image: publysher/hugo pages: script: - hugo artifacts: paths: - public only: - master

Slide 44

Slide 44 text

CI Lint

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

Roadmap ● Integrated Container Registry: push and pull directly from GitLab ● Deployments to Kubernetes and Docker Swarm ● Plugins for GitLab Runner: ○ Easy building of Docker images ○ Easy use of docker-compose workflow ● Artifacts for failed builds ● Dependent projects about.gitlab.com/direction

Slide 47

Slide 47 text

Any questions? We’ll answer what we can and follow up via email after! Watching the recording? about.gitlab.com/getting-help

Slide 48

Slide 48 text

Everyone can contribute! about.gitlab.com/strategy

Slide 49

Slide 49 text

@ayufanpl @GrzegorzBizon @TomaszMaczukin Thank you GitLab CI Team!

Slide 50

Slide 50 text

Thank you! Recording and Slides will be available on about.gitlab.com/blog