Build your JS Pipeline in Incremental Fashion with GitLab

Rate this content
Bookmark

Introducing CI/CD to your project might be a challenging process. In GitLab we value iteration as one of our key values, and in spirit of iteration we will be happy to share how GitLab could help you to gradually work on bringing your project to CI/CD heaven.

FAQ

Ilya Klimov's talk primarily focuses on three aspects of the DevOps cycle in GitLab: verify, package, and release, which are essential components of continuous integration and delivery.

In a Node.js environment, GitLab utilizes ESLint for linting and Jest for running tests. They also maintain their own linting rules.

GitLab supports the entire DevOps cycle from creation, issue management, and planning to protection against malicious activities and monitoring the health of production and staging environments.

Auto DevOps in GitLab automates steps in the build and deployment processes, making it easier to manage code quality, security checks, and deployments. It is beneficial because it reduces manual configuration and speeds up the DevOps process.

The release stage can be challenging due to the complexity of ensuring code runs correctly across different environments and dealing with various versions of dependencies, which can lead to unpredictable errors.

Yes, the Auto DevOps pipeline in GitLab is customizable. Users can configure build steps, enable or disable review apps, and integrate Kubernetes clusters according to their project needs.

The Directed Acyclic Graph (DAG) feature in GitLab allows for more efficient job management within pipelines by specifying dependencies between jobs. This enables some jobs to run concurrently as soon as their dependencies are met, reducing overall pipeline execution time.

GitLab optimizes pipeline performance by caching dependencies like node modules between build steps, which minimizes the need to run time-consuming installations like npm install or yarn install during each build.

Illya Klymov
Illya Klymov
32 min
01 Jul, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

GitLab supports the entire DevOps cycle and uses tools like YesLint, Jest, Docker, and Kubernetes. Cache and validation are major challenges in DevOps. GitLab's auto DevOps feature simplifies Docker, Kubernetes, and Helm. Customization and advanced options are available in GitLab. GitLab's pipeline allows for optimizing job dependencies and continuous improvement. The average duration of front-end build pipelines is under 10 minutes for most people. Running a build and pipeline process in GitLab involves job calculations, runner setup, and hidden logic. GitLab can help with running front-end in Kubernetes and has a DAG visualizer. Dealing with flaky tests in the frontend is a challenge in GitLab pipelines.

1. Introduction to DevOps Cycle and Tools

Short description:

I'm Ilya Klimov from GitLab, a senior frontend engineer. GitLab supports the entire DevOps cycle, focusing on verify, package, and release. On the Verify stage, we use tools like YesLint and Jest for code quality and testing. Packaging is now standardized with Docker. Lastly, I will discuss Kubernetes for release.

Hello, everyone. My name is Ilya Klimov. I'm from GitLab, from a managed import team. I'm a senior frontend engineer, and I love fast things. So I drive a lot to Celes car, I try to use my one gigabit speed Internet connection where possible, and also I love GitLab for fast build times. And while the first two obviously out of context of our conference, I will be happy to share my knowledge with the third one.

So we in GitLab are trying to support you for entire DevOps cycle, starting from create, where you create your source code, managing issues, planning ethics and so on and so on. And ending with protecting you from different malicious activities and monitoring the health of all your production staging and so on environments. But obviously speaking about entire DevOps cycle will take forever to complete. So let's focus just on these three things. It's verify, package and release, which is basically what is continuous integration about and continuous delivery will be just right after that. Delivering the things to the right after the release somewhere to your actual running environment.

So what's the problem here? It usually starts pretty simple. On the Verify stage, somewhere, usually in Node.js environment, since we are in JavaScript conference and we are speaking about Node.js environment, even if you're a front-end engineer, you usually run some of your favorite tools to check code quality, to run your tests. For example, in GitLab, we utilize YesLint and Jest for linting. We also maintain our own linting rules and for running tests. Long time ago, we used Karma to do the things, but frankly speaking, I'm very happy that times have gone. And probably we will introduce some more tooling later. At this step, the main idea is to make sure that everything goes well and that your code behaves as expected. After that, obviously, we need to package your code to deliver to production. And I'm pretty happy that, well, I'm pretty long in software development, more than 10 years. And I remember when you need to invent your own delivery tools for a long, long time. So right now, Docker is a standard way of doing things. And I'm pretty happy to have that. Standardizing things is cool. And we will speak today a lot about making things standard, either entirely for JavaScript community or just for your company. Because every company obviously has its own approach. So the last one is release. And here, things are not so stable as on package stage. For this talk, I will focus a bit on the Kubernetes, which is pretty standard for running Docker containers.

2. Challenges with Tools in the DevOps Pipeline

Short description:

Even tools are hard. Building a good test is complex. Ensuring code runs properly with different versions of Node.js can lead to unpredictable errors. The complexity of the pipeline grows quickly as more tools are added.

I realize probably your pipeline may be or your future pipeline may not utilize it. You may probably pick another way of running code or running Docker containers on the bare metal, whatever. But just for now, let's start with this one. And the problem here is that even tools are hard. Building a good test is a very complex thing, which is probably worth another talk. Making sure that your code runs properly when your development environment and continuous integration environment have different versions of Node.js may be tricky and may lead to unpredictable errors. One day I spent half of a day debugging an unknown crash, literally six-fold, which was one minor in the third part of the version, different than Node.js. I never wish to do that again. But as you see, we are adding more and more tools in our pipeline, even just for these three steps, the complexity grows very quickly.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Why is CI so Damn Slow?
DevOps.js Conf 2022DevOps.js Conf 2022
27 min
Why is CI so Damn Slow?
We've all asked ourselves this while waiting an eternity for our CI job to finish. Slow CI not only wrecks developer productivity breaking our focus, it costs money in cloud computing fees, and wastes enormous amounts of electricity. Let’s take a dive into why this is the case and how we can solve it with better, faster tools.
End the Pain: Rethinking CI for Large Monorepos
DevOps.js Conf 2024DevOps.js Conf 2024
25 min
End the Pain: Rethinking CI for Large Monorepos
Scaling large codebases, especially monorepos, can be a nightmare on Continuous Integration (CI) systems. The current landscape of CI tools leans towards being machine-oriented, low-level, and demanding in terms of maintenance. What's worse, they're often disassociated from the developer's actual needs and workflow.Why is CI a stumbling block? Because current CI systems are jacks-of-all-trades, with no specific understanding of your codebase. They can't take advantage of the context they operate in to offer optimizations.In this talk, we'll explore the future of CI, designed specifically for large codebases and monorepos. Imagine a CI system that understands the structure of your workspace, dynamically parallelizes tasks across machines using historical data, and does all of this with a minimal, high-level configuration. Let's rethink CI, making it smarter, more efficient, and aligned with developer needs.
Atomic Deployment for JS Hipsters
DevOps.js Conf 2024DevOps.js Conf 2024
25 min
Atomic Deployment for JS Hipsters
Deploying an app is all but an easy process. You will encounter a lot of glitches and pain points to solve to have it working properly. The worst is: that now that you can deploy your app in production, how can't you also deploy all branches in the project to get access to live previews? And be able to do a fast-revert on-demand?Fortunately, the classic DevOps toolkit has all you need to achieve it without compromising your mental health. By expertly mixing Git, Unix tools, and API calls, and orchestrating all of them with JavaScript, you'll master the secret of safe atomic deployments.No more need to rely on commercial services: become the perfect tool master and netlifize your app right at home!
How to Build CI/CD Pipelines for a Microservices Application
DevOps.js Conf 2021DevOps.js Conf 2021
33 min
How to Build CI/CD Pipelines for a Microservices Application
Top Content
Microservices present many advantages for running modern software, but they also bring new challenges for both Deployment and Operational tasks. This session will discuss advantages and challenges of microservices and review the best practices of developing a microservice-based architecture.We will discuss how container orchestration using Kubernetes or Red Hat OpenShift can help us and bring it all together with an example of Continuous Integration and Continuous Delivery (CI/CD) pipelines on top of OpenShift.
Automated Performance Regression Testing with Reassure
React Advanced Conference 2022React Advanced Conference 2022
16 min
Automated Performance Regression Testing with Reassure
As developers we love to dive into performance metrics, benchmarks, compare one solution to another. Whether we enjoy it or not, we’re often required to fix performance issues in our React and React Native apps. But this process is not sustainable and prone to regressions, especially as the app and team grow. What’s worse, those issues are often discovered by your users, making their experience miserable. In my talk I’ll introduce you to Reassure—a performance regression testing library for React and React Native— which happens to be a missing piece in our automated testing and performance suites. Spotting problems before they hit production.
How to Get CI/CD Right in 2021: A Guide to CI and CD
DevOps.js Conf 2021DevOps.js Conf 2021
9 min
How to Get CI/CD Right in 2021: A Guide to CI and CD
Software delivery is a top priority for organizations that own software, yet it remains one of the most challenging problems enterprises face today. Continuous integration (CI) and continuous delivery (CD) are software practices that allow organizations and teams to deliver code to customers quickly, safely, and repeatedly. Whether it's to improve development, operations, or security, CI/CD pipelines give engineers and teams more time to work on things that matter and less time struggling with the risk, standards, and velocity of deployments. Join this session to learn about the components of CI/CD and how to build and scale pipelines for the future.

Workshops on related topic

Bring Code Quality and Security to your CI/CD pipeline
DevOps.js Conf 2022DevOps.js Conf 2022
76 min
Bring Code Quality and Security to your CI/CD pipeline
WorkshopFree
Elena Vilchik
Elena Vilchik
In this workshop we will go through all the aspects and stages when integrating your project into Code Quality and Security Ecosystem. We will take a simple web-application as a starting point and create a CI pipeline triggering code quality monitoring for it. We will do a full development cycle starting from coding in the IDE and opening a Pull Request and I will show you how you can control the quality at those stages. At the end of the workshop you will be ready to enable such integration for your own projects.
Powering your CI/CD with GitHub Actions
DevOps.js Conf 2022DevOps.js Conf 2022
155 min
Powering your CI/CD with GitHub Actions
Workshop
David Rubio Vidal
David Rubio Vidal
You will get knowledge about GitHub Actions concepts, like:- The concept of repository secrets.- How to group steps in jobs with a given purpose.- Jobs dependencies and order of execution: running jobs in sequence and in parallel, and the concept of matrix.- How to split logic of Git events into different workflow files (on branch push, on master/main push, on tag, on deploy).- To respect the concept of DRY (Don't Repeat Yourself), we will also explore the use of common actions, both within the same repo and from an external repo.
Debugging JavaScript Apps in CI/CD
DevOps.js Conf 2022DevOps.js Conf 2022
124 min
Debugging JavaScript Apps in CI/CD
Workshop
Cecelia Martinez
Cecelia Martinez
- Causes of failed builds in CI/CD pipelines- Approaches to debugging (reviewing logs, accessing environments, reproducing issues)- Debugging application-related causes (failing tests, failed application builds)- Debugging pipeline-related causes (pipeline setup, environment issues, container issues)
CI/CD 101 with CircleCI
DevOps.js Conf 2021DevOps.js Conf 2021
149 min
CI/CD 101 with CircleCI
Workshop
Angel Rivera
Zan Markan
2 authors
Continuous Integration and Continuous Delivery/Deployment (CI/CD) concepts are increasingly adopted many technology organizations and teams. CI/CD enables teams to establish processes that increase velocity, collaboration and quality of their codebase. CI/CD enables developer & operations teams to break down unnecessary silos and gain a deeper knowledge of their respective arenas.
In this workshop the participants will be introduced to the basic fundamentals of Continuous Integration and Continuous Delivery/Deployment. Participants will learn the core principles of CI/CD and have the opportunity to reinforce what they’ve learned in a hands on workshop featuring the CircleCI platform. The workshop will demonstrate CI/CD build configuration, code commits, commit builds, code testing and packaging. The participants will leave with a hands-on experience and understanding of what it takes to CI/CD.
Table of contents- Introduction to the topic of CI/CD, and motivation for it- How different kinds of JavaScript projects are built and deployed (from static sites to APIs)- Overview of common manual steps & how we might automate them- Implementing a CI/CD pipeline from 'scratch'- Overview of CircleCI orbs- Testing across multiple versions of Node- Debugging builds with SSH- Caching dependencies- Security / vuln scanning- Deploying to various outlets
Prerequisites- Code and git installed- GitHub account
github.com/CircleCI-Public/cicd-workshop-js