--- layout: feature title: GitLab Continuous Integration & Delivery description: "Learn about GitLab's integrated CI/CD pipelines that help to build, test, deploy, and monitor your code." suppress_header: true canonical_path: "/stages-devops-lifecycle/continuous-integration/" extra_css: - gitlab-feature-landing-page.css - features.css --- .wrapper.gitlab-ee-page .blank-header = image_tag "/images/home/icons-pattern-left.svg", class: "image-border image-border-left", alt: "Gitlab hero border pattern left svg" = image_tag "/images/home/icons-pattern-right.svg", class: "image-border image-border-right", alt: "Gitlab hero border pattern right svg" .header-content = image_tag "/images/devops-tools/gitlab-logo.svg", class: "hero-image-small", alt: "Gitlab logo svg" %h1 GitLab Continuous Integration (CI) & Continuous Delivery (CD) %p GitLab CI/CD pipelines build, test, deploy, and monitor your code as part of a single, integrated workflow = link_to "Watch a GitLab CI/CD webcast", "/webcast/mastering-ci-cd/", class: "btn cta-btn orange" .sub-wrapper .container .row.advantages .col-xs-1.col-md-1 .col-xs-10.col-md-10 %h2 Continuous Integration is built-in to GitLab %p = succeed ' ' do %strong Continuous Integration (CI) works to integrate code provided by your team in a shared repository. Developers share the new code in a Merge (Pull) Request. The request triggers a pipeline to build, test, and validate the new code prior to merging the changes within your repository. %p The practice of = succeed ' ' do %strong Continuous Delivery (CD) ensures the delivery of CI validated code to your application by means of a structured deployment pipeline. %p Together, %a{href: "/ci-cd/"} CI and CD act to accelerate how quickly your team can deliver results for your customers and stakeholders. CI helps you catch and reduce bugs early in the development cycle, and CD moves verified code to your applications faster. %p CI and CD must work seamlessly together in order for your team to build fast and effectively, as well as being critical to ensuring a fully optimized development practice. GitLab CI/CD is rated #1 in the Forrester CI Wave™. .col-xs-1.col-md-1 %hr.divider/ .row .hidden-xs.hidden-sm.col-md-4.col-md-offset-1 = image_tag "/images/home/forrester-ci-wave-graphic.svg", class: "hidden-xs", alt: "Best in class continuous integration" .col-xs-12.col-md-6 %h2 Rated #1 in the Forrester CI Wave™ %p “GitLab supports development teams with a well-documented installation and configuration processes, an easy-to-follow UI, and a flexible per-seat pricing model that supports self service. GitLab’s vision is to serve enterprise-scale, integrated software development teams that want to spend more time writing code and less time maintaining their tool chain.” - Forrester CI Wave™ = link_to "Get the report", "/resources/forrester-wave-ci-2017/", class: "btn cta-btn accent" %hr.divider/ .row.advantages .col-xs-1.col-md-1 .col-xs-10.col-md-10 %h2 What is CI? %b Continuous Integration is the practice of merging all the code that is being produced by developers. The merging usually takes place several times a day in a shared repository. From within the repository, or production environment, building and automated testing are carried out that ensure no integration issues and the early identification of any problems. %h2 What is CD? %b Continuous Delivery adds that the software can be released to production at any time, often by automatically pushing changes to a staging system. %p %b Continuous Deployment goes further and pushes changes to production automatically. .col-xs-1.col-md-1 %hr.divider/ .row.advantages .col-xs-1.col-md-1 .col-xs-10.col-md-10 %h2 Why your team needs a CI/CD workflow %h3 Continuous Integration %ul %li %b Detects errors as quickly as possible: fix problems while fresh in developers mind %li %b Reduces integration problems: smaller problems are easier to digest %li %b Avoid compounding problems: allows teams to develop faster, with more confidence %h3 Continuous Delivery %ul %li %b Ensures every change is releasable: test everything, including deployment, before calling it done %li %b Lowers risk of each release: makes releases “boring” %li %b Delivers value more frequently: reliable deployments mean more releases %li %b Tight customer feedback loops: fast and frequent customer feedback on changes .col-xs-1.col-md-1 .col-xs-10.col-md-10.col-md-offset-1 = image_tag "/images/blogimages/cicd_pipeline_infograph.png", alt: "CI/CD Overview", style: "margin-top: 40px;" %hr.divider/ .row.advantages .col-xs-1.col-md-1 .col-xs-10.col-md-10 %h2 What are the advantages of GitLab CI/CD? %ul %li %b Integrated: GitLab CI/CD is part of GitLab, enabling a single conversation from planning to deployment (and beyond) %li %b Open source: CI/CD is a part of both the open source GitLab Community Edition and the proprietary GitLab Enterprise Edition %li %b Easy to learn: See our %a{href: "https://docs.gitlab.com/ee/ci/quick_start/"} Quick Start guide %li %b Seamless: Part of the single GitLab application, with a single great user experience %li %b Scalable: Tests run distributed on separate machines of which you can add as many as you want %li %b Faster results: Each build can be split in multiple jobs that run in parallel on multiple machines %li %b Optimized for delivery: multiple stages, manual deploy gates, %a{href: "https://docs.gitlab.com/ee/ci/environments.html"} environments, and %a{href: "https://docs.gitlab.com/ee/ci/variables/"} variables .col-xs-1.col-md-1 .col-xs-10.col-md-10.col-md-offset-1 = image_tag "/images/ci/ci-cd-test-deploy-illustration_2x.png", alt: "GitLab CI/CD", style: "margin-top: 40px;" %hr.divider/ .row.more-features .col-xs-1.col-md-1 .col-xs-10.col-md-10 %h2 Features %ul %li %b Multi-platform: you can execute builds on Unix, Windows, macOS, and any other platform that supports Go. %li %b Multi-language: build scripts are command line driven and work with Java, PHP, Ruby, C, and any other language. %li %b Stable: your builds run on a different machine than GitLab. %li %b Parallel builds: GitLab CI/CD splits builds over multiple machines, for fast execution. %li %b Realtime logging: a link in the merge request takes you to the current build log that updates dynamically. %li %b Flexible pipelines: you can define multiple parallel jobs per stage and you can = succeed "." do %a{href: "https://docs.gitlab.com/ee/ci/triggers/"} trigger other builds %li %b Versioned pipelines: a %a{href: "https://docs.gitlab.com/ee/ci/yaml/"} .gitlab-ci.yml file contains your tests and overall process steps, allowing everyone to contribute changes and ensuring every branch gets the pipeline it needs. %li %b Autoscaling: you can = link_to "automatically spin up and down VM's", "/blog/2016/03/29/gitlab-runner-1-1-released/" to make sure your builds get processed immediately and minimize costs. %li %b Build artifacts: you can upload binaries and other %a{href: "https://docs.gitlab.com/ee/ci/build_artifacts/"} build artifacts to GitLab and browse and download them. %li %b Test locally there are %a{href: "https://docs.gitlab.com/runner/executors/"} multiple executors and you can = succeed "." do %a{href: "https://gitlab.com/gitlab-org/gitlab-runner/issues/312"} reproduce tests locally %li %b Docker support: you can use custom Docker images, spin up %a{href: "https://docs.gitlab.com/ee/ci/services/"} services as part of testing, = succeed "," do %a{href: "https://docs.gitlab.com/ee/ci/docker/using_docker_build.html"} build new Docker images even run on Kubernetes. %li %b Container Registry: %a{href: "https://docs.gitlab.com/ee/user/project/container_registry.html"} built-in container registry to store, share, and use container images. %li %b Protected variables: securely store and use secrets during deployments using per environment %a{href: "https://docs.gitlab.com/ee/ci/variables/README.html#protected-variables"} protected variables %li %b Environments: define multiple environments including temporary %a{href: "https://about.gitlab.com/features/review-apps/"} Review Apps , see deployment history for every environment. .col-xs-1.col-md-1 %hr.divider/ .row .col-xs-12.col-md-6.col-md-offset-1 %h2 GitLab is one application for the entire DevOps lifecycle %ul %li %b Build your application using GitLab Runners %li Run unit and integration %b tests to check if your code is valid %li Look at a live preview of your development branch with %a{href: "/product/review-apps/"}Review Apps before merging into stable %li %b Deploy to multiple environments like staging and production, and support advanced features such as canary deployments %li %b Monitor performances and status of your application .hidden-xs.hidden-sm.col-md-4 = image_tag "/images/ci/ci-cd-devops-loop_2x.png", alt: "DevOps", style: "margin-top: 80px;" %hr.divider/ .row .hidden-xs.hidden-sm.col-md-4.col-md-offset-1 = image_tag "/images/ci/ci-cd-integrated_2x.png", class: "hidden-xs", alt: "Integrated GitLab CI" .col-xs-12.col-md-6 %h2 Fully integrated with GitLab %ul %li %b Quick project setup: Add projects with a single click, all hooks are set up automatically via the GitLab API. %li %b Merge request integration: See the status of each build within the Merge Request in GitLab. %hr.divider/ .row.architecture .col-xs-1.col-md-1 .col-xs-12.col-md-6 %h2 Architecture .architecture-text %p %b GitLab CI/CD is a part of GitLab, a web application with an API that stores its state in a database. It manages projects/builds and provides a nice user interface, besides all the features of GitLab. %p %b GitLab Runner is an application which processes builds. It can be deployed separately and works with GitLab CI/CD through an API. %p In order to run tests, you need at least one %b GitLab instance and one = succeed "." do %b GitLab Runner .hidden-xs.hidden-sm.col-md-4 = image_tag "/images/ci/ci-cd-architecture_2x.png", class: "gitlab-arch hidden-xs", alt: "Gitlab ci cd architecture png" %hr#gitlab-runner.divider/ .row.installation .hidden-xs.hidden-sm.col-md-4.col-md-offset-1 = image_tag "/images/ci/gitlab-runner-logo_2x.png", class: "hidden-xs", alt: "Integrated GitLab CI", style: "width: 60%; margin-top: 60px; margin-left: 20%;" .col-xs-12.col-md-6 %h2#gitlab-runner GitLab Runner %p To perform the actual build, you need to install GitLab Runner which is written in Go. %p It can run on any platform for which you can build Go binaries, including Linux, macOS, Windows, FreeBSD and Docker. %p It can test any programming language including .Net, Java, Python, C, PHP and others. %p GitLab Runner has = succeed "," do %a{href: "https://docs.gitlab.com/runner#features"} many features including = succeed "," do %a{href: "https://docs.gitlab.com/runner/configuration/autoscale.html"} autoscaling = succeed "," do %a{href: "https://docs.gitlab.com/runner/executors/docker.html"} great Docker support and the ability to run multiple jobs concurrently. %p %h3 %a{href: "https://docs.gitlab.com/runner/install"} Install GitLab Runner %hr.divider/ .row.links .col-xs-1.col-md-1 .col-xs-11.col-md-6 %h2 Help and More Information %ul %li Please see = link_to "Get help for GitLab", "/get-help/" if you have questions %li View a step-by-step guide to %a{href: "https://www.youtube.com/watch?v=RlEVGOpYF5Y"} migrate from Jenkins to GitLab %li Propose and discuss new features of CI/CD in the %a{href: "https://gitlab.com/gitlab-org/gitlab/issues"} GitLab issue tracker and tag them with the 'CI/CD' label %li More information can be found in the %a{href: "https://docs.gitlab.com/ee/ci/"} GitLab CI/CD documentation %li Since version 8.0, GitLab CE/EE and GitLab CI/CD are a single product %li See the presentation on %a{href: "https://docs.google.com/presentation/d/1OGgk2Tcxbpl7DJaIOzCX4Vqg3dlwfELC3u2jEeCBbDk"} Why CI/CD? .hidden-xs.hidden-sm.col-md-4 = image_tag "/images/ci/gitlab-ci-cd-logo_2x.png", class: "gitlab-arch hidden-xs", alt: "Gitlab ci cd logo png", style: "width: 60%;" %hr.divider/