This book explores the GitLab platform, an online system that allows you to host and test code, deploy your application, as well as manage changes, features, bugs, documentation, and much more. We'll explore using the online offering provided by GitLab.com as well as setting up your own GitLab server, creating/importing/editing projects, and testing/deploying your project directly through GitLab.
You're reading from GitLab Quick Start Guide
Who this book is for
This book is geared towards system administrators and developers (and hybrid roles including SREs and DevOps) who are looking to learn more about the GitLab version control/code hosting platform; however, it is usable by anyone who sees a use for version control systems, including authors writing a book or teams looking for a collaborative way to edit large markup files or datasets.
For those just looking to explore GitLab's web user interface, create projects, and edit files online, readers should be comfortable with a web browser and very basic familiarity with the Terminal or command line, including changing directories and listing files in a directory.
Readers who are interested in installing their own GitLab instance must be familiar with using a Unix-based operating system such as Ubuntu or CentOS, including working with the command line and installing software.
People taking advantage of the continuous integration/continuous delivery features of GitLab should be comfortable with their programming language of choice as well as any preferred test suites or linters. The examples in this book use a PHP project, but it is just to demonstrate committing code and setting up tests. It's not a core requirement to know PHP.
What this book covers
Chapter 1, Introducing GitLab, is a brief introduction to GitLab and its features. We explore the basic concepts of version control systems and look at Git in particular.
Chapter 2, Setting Up GitLab, covers account creation on GitLab and, for those interested in running their own GitLab server, we go into installation and some basic configuration using both the provided Omnibus packages and a manual install.
Chapter 3, GitLab Flow, delves further into Git, including how to use it, followed by an older best practices workflow for Git projects. This is used to introduce the GitLab flow, a method of working with Git and GitLab for increased efficiency and simplicity.
Chapter 4, Issues to Merge Requests, gets you acquainted with the GitLab user interface by creating projects, basic project management, and working with merge requests, all demonstrated using an example project.
Chapter 5, Continuous Integration and Continuous Deployment, gives you a look at the CI/CD features of GitLab that allow for automated testing and deployment of your applications.
Chapter 6, Porting from GitHub and Subversion (SVN), explains how to migrate from other code hosting platforms and other version control systems.
Chapter 7, Advanced and Paid Features, finishes the book by looking at some of the extra parts of GitLab to help you become a power user, while also introducing some of the paid features GitLab provides if you want to consider an enterprise license.
Appendix, Introduction To Markdown, we will give you a brief overview on Markdown and how it can be applied at various instances such as Headings, Emphasising content, lists, adding links, images, and creating a block of code.
To get the most out of this book
I recommend having a computer nearby while reading this book so that you can explore the user interface options in GitLab as you go. While knowledge of PHP isn't a prerequisite, it is used in the example project, so passing familiarity is handy. If you've used other object-oriented programming languages before it'll mostly make sense.
Download the example code files
You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packt.com.
- Select the SUPPORT tab.
- Click on Code Downloads & Errata.
- Enter the name of the book in the Search box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/GitLab-Quick-Start-Guide. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/9781789534344_ColorImages.pdf.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Firstly we need to update the external_url value in our /etc/gitlab
/gitlab.rb file to reference HTTPS."
A block of code is set as follows:
<?php
namespace Judges119\Monolog\Formatter;
use Monolog\Formatter\FormatterInterface;
class ROT13Formatter implements FormatterInterface
{
public function format(array $record)
{
return str_rot13($record['message']);
}
public function formatBatch(array $records)
{
foreach ($records as $key => $record) {
$records[$key] = $this->format($record);
}
return $records;
}
}
Any command-line input or output is written as follows:
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "The last section of interest to us is Environments. By clicking on Operations | Environments through the menu on the left "
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at customercare@packtpub.com.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packt.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packt.com.