We may earn an affiliate commission when you visit our partners.
Course image
Valentin Despa and Valentin Despa - Support

This course is neither endorsed by, nor in partnership, nor affiliated with GitLab, Inc.

Read more

This course is neither endorsed by, nor in partnership, nor affiliated with GitLab, Inc.

This course will teach you how to use Gitlab CI for your own projects. You will learn the basics of CI/CD and start building pipelines right from the first lecture.

Some highlights:

- have an overview of the Gitlab architecture

- create a simple pipeline

- learn the CI/CD practice by deploying a simple website

- use Docker images within Gitlab

- learn how to deploy a Java application to AWS, using AWS S3 and AWS Elastic Beanstalk.

This course will NOT make you a GitLab CI / DevOps expert

A lot of courses promise you will become an expert. Becoming an expert in any tool comes with time and hard work. It simply does not make sense to promise something like that. It will not be honest.

This is a course designed for beginners. Learning to build pipelines is a try-and-error process that can be very frustrating. You need to understand the tools you use and how GitLab can support your needs. In the end, GitLab is just a tool.

What I will try is to explain to you the basics and offer you enough practice opportunities so that you can apply what you learn easily in your own projects as well. I will show you how to build pipelines with Gitlab CI.

Enroll now

What's inside

Learning objectives

  • What is a pipeline
  • What is continuous integration (ci), continuous delivery (cd) and continuous deployment (cd)
  • Automate your build, test & deployment with gitlab ci
  • Learn industry "best practices" in building ci/cd pipelines
  • Demonstrate your understanding of building ci/cd pipelines to future employers
  • Automate your builds, tests, and deployments
  • Automatic deployments using aws
  • Build pipelines with code quality checks, unit tests, api testing
  • Solve problems with hands-on assignments
  • Create merge requests and review code
  • Dynamic environments
  • Show more
  • Show less

Syllabus

Introduction
Course notes & important resources

This lecture aims to give you an understanding what pipelines are and how they can be built into Gitlab CI following a very simple example. This will use two simple stages and define two jobs assigned to each stage in Gitlab CI.

Read more
My GitLab CI pipeline is not running
Configuring Git for Gitlab CI
Gitlab architecture
Quiz #1
Why GitLab CI?
How much does Gitlab cost?
About the course
Important skills you need to acquire
Basic CI/CD workflow with Gitlab CI
Overview
What is CI / CD?
Alternative if you don't want to install new software
Short introduction to Node.js
Creating a new project
Troubleshooting
Building the project locally
Short introduction to images and Docker
Building the project using Gitlab CI
Adding a test stage
Running jobs in parallel
Running jobs in the background
Debugging the error curl: (7) Failed to connect to localhost port 9000: Connect
Deployment using surge.sh
Using Environment variables for managing secrets
Deploying the project using Gitlab CI

Many CLI tools look for existing predefined environment variables to use. This is why we have defined SURGE_LOGIN and SURGE_TOKEN as environment variables in GitLab CI.

Quiz #2
Post-deployment tests
Gitlab CI Fundamentals
Predefined environment variables
Pipeline triggers / Retrying failed jobs / Pipeline schedules
Using caches to optimize the build speed
Assignment: Improving build speed by using caches
Cache vs Artifacts
Deployment Environments
Defining variables
Manual deployments / Manually triggering jobs
Merge requests - Using branches
Merge requests - What is a Merge Request?
Merge requests - Configuring Gitlab
Merge requests - Your first merge request
Working with Merge Requests
Dynamic environments
Troubleshooting environment variables not being available
Destroying environments (Clean-up after the Merge Request)
before_script & after_script configuration
Recap & conclusion
YAML basics

- YAML is just a data serialization language which allows us to store different things. In our case, we use YAML to define a pipeline but YAML can be used for many other things (examples ???)

- to put it very simple, YAML can be used to define key - value pairs. For example name: John. But YAML can also store lists or objects.

- this is exactly what we have done so far, but without going too much into the details of what everything is

- while it may not look like, YAML is actually compatible to another format called JSON

- name: John

age: 23

food:

  - pizza

  - donuts

  - coke

friend:

    name: Joe

    age: 30

    food: null



- comments can be created with hashtags # foo


Disabling jobs
Anchors
Creating job templates
Using Gitlab CI to build and deploy a Java application to AWS Elastic Beanstalk

In this section, we increase the complexity of the application we are building and deploying. We will be building and testing a Java application, and we will deploy it to Amazon Web Services (AWS). I understand if you are not a Java developer or are not interested in using Java or AWS (Amazon Web Services). This section tries to provide you with a realistic example. I can assure it is totally fine just to watch and understand the underlying concepts which can apply to any other technologies and services.

The pipeline we will be building is more complex,  but the same GitLab CI principles will be used.

In this process, you will learn:

- build an advanced CI pipeline with code-style checks, unit tests, API tests, performance tests & security checks

- publish test results (both in HTML and XML format)

- learn about cloud services and how to use AWS for deployments

This means you will be exposed to new tools and technologies that you may not be familiar with. Overall the complexity of this project is much higher than before. As with many new things, a bit of patience is required when things do not work as expected.

As this course is focused on building pipelines with GitLab CI, I cannot give you a full introduction to all the tools and technologies used. I will provide you with links to articles and other video tutorials.

If you want to follow along, that is fantastic. As always, I am here in case you need help or get stuck.

Please note that some lectures may have a Troubleshooting document in the resources folder and can help you fix some common issues.

Are you just as excited to get started? Let's go!

This is a simple Java application that represents a simple car fleet management solution. The tool that you see here is an IDE called IntelliJ. I understand that if you are not familiar with IntelliJ, getting this to run on your computer may be challenging. If you can't get it to work, don't worry. This is nice to have but not needed to build the pipeline. Also, check the Resources for some tutorials that can help you get started.

I have already done the programming work, but together we will be building the CI/CD pipeline.

Feel free to clone this repository so that we all have a common basis to get started.

If you won't want to install and run the application locally, no problem. You can work on the .gitlab-ci.yml file without any issues.

What this application does is to expose an API that allows you to add, view, and remove cars from a database.

An API is a program that does not have a graphical interface, like a website, for example. But that API can use used by a front-end application to display the data in a browser.

As the Java application does not have a UI, we will use a software development tool called Postman, which is free to download and install. With Postman you can import the Postman collection and start interacting with the application.

We are ready to start building the pipeline for this project and the first step is the CI pipeline.

If you remember, the CI pipeline typically has a few stages: build, code quality, test, packaging the application for later use.

The purpose of the CI pipeline is to ensure that the artifact that we are building corresponds to our quality criteria and is releasable.

Let's start building the CI pipeline with the build stage. Even if you are not a Java developer or have no relation to Java, most programs go through a build stage.

The build process will take the source code and transform it into something that can be executed on a computer. We call this process compilation. In this case, the build process will translate source code into Java bytecode that can be executed on the Java Virtual Machine (JVM). The output is a jar file (which is an archive) that contains this code.

To run the build process locally, I will use a tool called Gradle, which is just a build tool.

The next step is to build the Java project, but this time using GitLab. We will do the following:

- define new pipeline file: .gitlab-ci.yml and add it to Git

- add build stage & job

- publish artifact

In this lecture, we quickly discuss what is a smoke test, what a possible smoke test could be for our application and will add a new test stage to the GitLab CI pipeline.

Now we have an artifact (or a package of software) and we are ready for deployment. There are two opposite directions in which we can go: deploy on your own infrastructure (aka server that we control and manage also called an in-house server) or deploy using a cloud provider, like Amazon AWS, Google Cloud, Microsoft Azure, and many others.

The advantage of using a cloud provider is that you only rent the infrastructure for the time you are using it. Using a cloud provider, you can focus on actually building and maintaining the application and forget about the hardware and scalability issues.

Which option makes more sense, it is up to you. For some of the reasons mentioned above, cloud services have risen greatly in popularity in the last years.

The following lectures will show to use Amazon AWS to deploy a Java application.

Amazon Web Services or simply AWS is a cloud platform offering over 170 services available in data centers located all over the world. Such services include virtual servers, managed databases, file storage, content delivery, and many others.

While this section focused on AWS, the principles presented here largely apply to any other providers.

This lecture discusses:

- how to create a new account

- how to to setup billing for AWS

Notice about unexpected costs while using AWS

This lecture contains a short Introduction to the serverless architecture and AWS Elastic Beanstalk. Even if you use a cloud provider like AWS, you can still rent a virtual machine that has a dedicated CPU, memory and disk.

If you use a virtual server, this means that you still need to handle software updates, back-ups, monitoring, and any other aspects that ensure your application is running as expected.

AWS Elastic Beanstalk is a way to deploy an application but let AWS handle the hardware and software needed to run it. It is probably one of the easiest ways to deploy an application in the cloud.

How to deploy to AWS (manual upload)

The goal is to automate the deployment process and to eliminate any manual work. Fortunately, AWS offers a tool called AWS CLI which allows us to deploy to AWS directly from GitLab CI.

AWS S3 is the main storage service for the entire AWS platform. In the following lecture we will use S3 to upload the artifact (the Java jar file).

The GitLab group functionality is a way to organize similar projects into groups. Having a group allows you to configure environment variables that are available in multiple projects.

Using the S3 copy command it is possible to upload a file (S3 object) from GitLab CI to AWS S3.

Deploying to AWS EB involves creating a new application version referencing the artifact from S3 and updating the production environment with the latest application version.

Assignment.

Assignment solution.

The Java application allows us to insert the application version in one of the info endpoints. This allows us to check which version is currently deployed, without opening the AWS management console.

We need to ensure that the right application version was deployed. The way to approach this is to look at the info endpoint which will tell us the current application version. Having this check is mandatory to avoid any confusion regarding what was deployed.

Revisiting the CI pipeline

Most projects want to have a consistent code style and to follow some conventions and best practices. Often automated tools are used to assist with this process.

These tools typically do static code analysis, as the inspection performed without actually running the code. This approach is in contrast with a dynamic code analysis, which will actually run the code in order to perform the inspection.

One simple one that can be used for Java projects is PMD. PMD can help find unused variables, problematic code blocks and overall to enforce generally accepted best practices.

PMD already has a large set of predefined rules but will also allow you to configure or add new rules, as needed.

In this assignment, you are required to add a new job that runs the PMD tool. This is supposed to detect any issues with the code.

This is the solution that shows how to add a new GitLab CI job that runs the PMD tool and generates a report.

In this lecture, we quickly go over that a unit test is. In a nutshell, unit tests are responsible for testing only single units of code, typically one class. The execution time is very fast and gives instant feedback.

For Java projects, JUnit is the most popular framework for writing unit tests.

In this video, we will take a look at how to run unit tests (JUnit) in GitLab CI, how to generate JUnit reports, how to publish and expect them after the execution.

When structuring a pipeline, you need to take into account multiple factors. In this lecture, we will quick explore some possibilities.

For this application, API tests are the highest level of tests we can execute. We will use Postman to write and execute some simple API tests.

GitLab Pages is a great addition to any CI/CD pipeline. GitLab Pages allows you to publish HTML websites directly from a repository. With some HTML and CSS skills, this great option for creating dashboards. This also allows you to publish HTML reports.

Final reminder to terminate all AWS services
Specific topics / User topics
Ask the instructor
Conclusion
Not the end
Bonus lecture

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Teaches CI/CD pipeline creation using Gitlab for custom projects
Uses industry standard practices for CI/CD pipelines
For absolute beginners in Gitlab CI/CD pipelines
Helps learners automate builds, tests, and deployments in Gitlab CI
Demonstrates basic and more advanced concepts of Gitlab CI/CD pipelines
Teaches how to automate deployments to AWS and the underlying AWS technologies

Save this course

Save GitLab CI: Pipelines, CI/CD and DevOps for Beginners to your list so you can find it easily later:
Save

Reviews summary

Solid foundation for gitlab ci beginners

According to students, the course provides clear explanations of GitLab CI basics. Learners say it is recommended for those with no experience in GitLab CI who want to learn.

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in GitLab CI: Pipelines, CI/CD and DevOps for Beginners with these activities:
Review graphical modeling systems
Reviewing graphical modeling systems used in the course will help you prepare for the material you will see in class
Show steps
  • Review the documentation for your graphical modeling system
  • Create a simple model to practice
Review Docker
A quick review of Docker will help refresh your memory before diving into the course material
Show steps
  • Read the Docker documentation
  • Watch a tutorial on Docker
  • Practice using Docker
Learn about YAML basics
Having a strong understanding of YAML will help you work effectively with GitLab CI
Show steps
  • Read the YAML documentation
  • Watch a tutorial on YAML
  • Practice writing YAML files
Six other activities
Expand to see all activities and additional details
Show all nine activities
Find a mentor to help you with GitLab CI
Finding a mentor can provide you with guidance and support as you learn about GitLab CI
Show steps
  • Identify potential mentors
  • Reach out to potential mentors
  • Meet with your mentor
Read Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation
This book provides a comprehensive overview of continuous delivery, which will complement the concepts you learn in the course
Show steps
  • Read the book
  • Take notes on the key concepts
  • Discuss the book with other students
Practice exercises
Additional practice will help you grasp the Gitlab CI concepts you're learning
Show steps
  • Set up a local development environment
  • Create a new GitLab CI pipeline
  • Add a build stage
  • Add a test stage
  • Add a deploy stage
Attend a GitLab workshop
Attending a GitLab workshop will provide you with hands-on experience with GitLab CI
Show steps
  • Find a GitLab workshop
  • Attend the workshop
  • Practice what you learn
Write blog post on CI/CD Best Practices
Writing a blog post will help you deepen your understanding of CI/CD best practices covered in the course
Show steps
  • Do some research on CI/CD best practices
  • Outline your blog post
  • Write the first draft
  • Edit and proofread
  • Publish your blog post
Create a simple CI/CD pipeline for a personal project
Creating a CI/CD pipeline for a personal project will allow you to apply the concepts you learn in the course to a real-world scenario
Show steps
  • Identify a personal project to create a CI/CD pipeline for
  • Set up a repository for your project
  • Create a GitLab CI pipeline for your project
  • Test your pipeline
  • Deploy your project

Career center

Learners who complete GitLab CI: Pipelines, CI/CD and DevOps for Beginners will develop knowledge and skills that may be useful to these careers:
DevOps Engineer
DevOps Engineers are responsible for bridging the gap between development and operations. They work to ensure that software is built, tested, and deployed efficiently and reliably. This course will provide you with the skills you need to be a successful DevOps Engineer. You will learn how to use GitLab CI to automate your build, test, and deployment process. You will also learn how to use AWS to deploy your applications. These skills are essential for any DevOps Engineer who wants to be successful in today's job market.
Software Engineer
Software Engineers are responsible for designing, developing, and maintaining software systems. This course will provide you with the foundation you need to be a successful Software Engineer. You will learn how to use GitLab CI to automate your build, test, and deployment process. You will also learn how to use AWS to deploy your applications. These skills are essential for any Software Engineer who wants to be successful in today's job market.
Machine Learning Engineer
Machine Learning Engineers are responsible for developing and deploying machine learning models. They work to ensure that models are accurate, efficient, and scalable. This course will provide you with the skills you need to be a successful Machine Learning Engineer. You will learn about the different types of machine learning models and how to develop them. You will also learn how to use AWS to deploy and manage machine learning models. These skills are essential for any Machine Learning Engineer who wants to be successful in today's job market.
Business Analyst
Business Analysts are responsible for understanding and documenting the business requirements of an organization. They work with stakeholders to define the scope of a project and to ensure that the project meets the needs of the business. This course will provide you with the skills you need to be a successful Business Analyst. You will learn about the different phases of business analysis and how to manage them. You will also learn how to use AWS to manage business requirements. These skills are essential for any Business Analyst who wants to be successful in today's job market.
Data Analyst
Data Analysts are responsible for collecting, cleaning, and analyzing data. They work to identify trends and insights that can be used to improve decision-making. This course will provide you with the skills you need to be a successful Data Analyst. You will learn about the different types of data and how to analyze them. You will also learn how to use AWS to manage data. These skills are essential for any Data Analyst who wants to be successful in today's job market.
Database Administrator
Database Administrators are responsible for managing and maintaining databases. They work to ensure that databases are always available and performant, and that data is secure. This course will provide you with the skills you need to be a successful Database Administrator. You will learn about the different types of databases and how to manage them. You will also learn how to use AWS to deploy and manage databases. These skills are essential for any Database Administrator who wants to be successful in today's job market.
Product Manager
Product Managers are responsible for defining and managing the product roadmap. They work to ensure that products meet customer needs and are successful in the marketplace. This course will provide you with the skills you need to be a successful Product Manager. You will learn about the different phases of product development and how to manage them. You will also learn how to use AWS to manage products. These skills are essential for any Product Manager who wants to be successful in today's job market.
Cloud Architect
Cloud Architects are responsible for designing and managing cloud computing solutions. They work with clients to assess their needs and design solutions that meet their specific requirements. This course will provide you with the foundation you need to be a successful Cloud Architect. You will learn about the different cloud computing providers and their services. You will also learn how to design and deploy cloud-based applications. These skills are essential for any Cloud Architect who wants to be successful in today's job market.
Technical Writer
Technical Writers are responsible for creating and maintaining documentation for software and hardware products. They work to ensure that documentation is clear, concise, and accurate. This course will provide you with the skills you need to be a successful Technical Writer. You will learn about the different types of technical documentation and how to write them. You will also learn how to use AWS to manage technical documentation. These skills are essential for any Technical Writer who wants to be successful in today's job market.
Site Reliability Engineer
Site Reliability Engineers are responsible for ensuring the reliability of software systems. They work to identify and mitigate risks, and to ensure that systems are always available and performant. This course will provide you with the skills you need to be a successful Site Reliability Engineer. You will learn how to use GitLab CI to automate your build, test, and deployment process. You will also learn how to use AWS to deploy your applications. These skills are essential for any Site Reliability Engineer who wants to be successful in today's job market.
Quality Assurance Engineer
Quality Assurance Engineers are responsible for ensuring the quality of software products. They work to identify and fix defects, and to ensure that products meet customer requirements. This course will provide you with the skills you need to be a successful Quality Assurance Engineer. You will learn how to use GitLab CI to automate your build, test, and deployment process. You will also learn how to use AWS to deploy your applications. These skills are essential for any Quality Assurance Engineer who wants to be successful in today's job market.
Artificial Intelligence Engineer
Artificial Intelligence Engineers are responsible for developing and deploying artificial intelligence models. They work to ensure that models are accurate, efficient, and scalable. This course will provide you with the skills you need to be a successful Artificial Intelligence Engineer. You will learn about the different types of artificial intelligence models and how to develop them. You will also learn how to use AWS to deploy and manage artificial intelligence models. These skills are essential for any Artificial Intelligence Engineer who wants to be successful in today's job market.
Project Manager
Project Managers are responsible for planning, executing, and closing projects. They work to ensure that projects are completed on time, within budget, and to the required quality standards. This course will provide you with the skills you need to be a successful Project Manager. You will learn about the different phases of a project and how to manage them. You will also learn how to use AWS to manage projects. These skills are essential for any Project Manager who wants to be successful in today's job market.
IT Security Analyst
IT Security Analysts are responsible for protecting computer systems and networks from unauthorized access, use, disclosure, disruption, modification, or destruction. This course will provide you with the skills you need to be a successful IT Security Analyst. You will learn about the different types of IT security threats and how to protect against them. You will also learn how to use AWS to implement IT security measures. These skills are essential for any IT Security Analyst who wants to be successful in today's job market.
Data Scientist
Data Scientists are responsible for developing and applying statistical and machine learning models to data. They work to identify patterns and trends that can be used to improve decision-making. This course will provide you with the skills you need to be a successful Data Scientist. You will learn about the different types of statistical and machine learning models and how to develop them. You will also learn how to use AWS to manage data and models. These skills are essential for any Data Scientist who wants to be successful in today's job market.

Reading list

We've selected eight books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in GitLab CI: Pipelines, CI/CD and DevOps for Beginners.
A classic in the field of CI/CD, this book provides a comprehensive overview of the principles and practices of continuous delivery, including the role of GitLab CI in the process.
Provides a broader perspective on DevOps principles and practices, offering insights into real-world DevOps transformations and case studies.
A comprehensive guide to modern software engineering practices, including CI/CD, DevOps, and agile development. It provides a high-level view of the industry landscape.
A classic guide to writing clean and maintainable code. While not specific to CI/CD, it provides valuable insights into coding practices that can improve the quality and reliability of software.
A reference guide to PMD, the tool used for static code analysis in the course. Provides detailed information on PMD's rules and configuration.
While not directly related to CI/CD, this book valuable resource for understanding concurrency in Java applications. It provides in-depth coverage of Java concurrency features and best practices.
While not specific to CI/CD, this book offers a practical guide to agile testing techniques. It provides a good foundation for understanding the role of testing in agile environments.
A simplified introduction to DevOps for beginners. It covers the basics of CI/CD and DevOps culture, but may not provide as much technical depth as other resources.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to GitLab CI: Pipelines, CI/CD and DevOps for Beginners.
AWS: CI/CD Pipelines and Deployment Strategies
Most relevant
DevOps: CI/CD using AWS CodePipeline & Elastic Beanstalk
Most relevant
Learn Github Actions for CI/CD DevOps Pipelines
Most relevant
Learn Azure DevOps CI/CD pipelines
Most relevant
Learn CI/CD YAML pipelines with Azure DevOps
Most relevant
Cisco DevOps 300-910: CI/CD Pipelines
Most relevant
Practicing CI/CD with AWS CodePipeline
Most relevant
Building a Modern CI/CD Pipeline with Jenkins
Most relevant
Google Cloud CI/CD Pipelines (GCP DevOps Engineer Track...
Most relevant
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser