Section 2: DevOps CI/CD Pipeline
Chapter 05: Managing Your Source Code with Git
Chapter 06: Continuous Integration and Continuous Delivery
Chapter 5: Managing Your Source Code with Git 131
Technical requirements 132
Overviewing Git and its command lines 132
Git installation 135
Configuration Git 140
Git vocabulary 140
Git command lines 141
Retrieving a remote repository 142
Initializing a local repository 142
Configuring a local repository 142
Adding a file for the next commit 142
Creating a commit 143
Updating the remote repository 143
Synchronizing the local repository from the remote 144
Managing branches 144
Understanding the Git process and GitFlow pattern 145
Starting with the Git process 146
Table of Contents
[ iv ]
Creating and configuring a Git repository 146
Committing the code 150
Archiving on the remote repository 151
Cloning the repository 153
The code update 154
Retrieving updates 154
Isolating your code with branches 155
Branching strategy with GitFlow 158
The GitFlow pattern 159
GitFlow tools 160
Summary 162
Questions 162
Further reading 163
Chapter 6: Continuous Integration and Continuous Delivery 164
Technical requirements 165
The CI/CD principles 165
Continuous integration (CI) 166
Continuous delivery (CD) 166
Using a package manager 167
Private NuGet and npm repository 169
Nexus Repository OSS 169
Azure Artifacts 170
Using Jenkins 172
Installing and configuring Jenkins 172
Configuring a GitHub webhook 174
Configuring a Jenkins CI job 176
Executing the Jenkins job 180
Using Azure Pipelines 181
Versioning of the code with Git in Azure Repos 183
Creating the CI pipeline 185
Creating the CD pipeline: the release 195
Using GitLab CI 202
Authentication at GitLab 203
Creating a new project and managing your code source 204
Creating the CI pipeline 209
Accessing the CI pipeline execution details 210
Summary 212
Questions 213
Further reading 213
|