Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 89b1ccb

Browse files
author
Michael Friedrich
authored
Merge pull request #20 from NETWAYS/feature/enhance-workflows
Enhance Git Workflows
2 parents 870306f + a8e273c commit 89b1ccb

9 files changed

+46
-74
lines changed
-30.8 KB
Binary file not shown.
-32.7 KB
Binary file not shown.

day2/01_Workflows/01_Intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Single user environments
99
* Multiple users working together
1010
* Branching models
11-
* Patch and pull request workflow integration
11+
* Merge and pull request workflow integration
1212

1313
~~~SECTION:handouts~~~
1414

day2/01_Workflows/02_Centralized.md

+6-21
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
!SLIDE smbullets
22
# Centralized Workflow
33

4-
* Multiple users
5-
* Each user has a local copy
6-
* Central `master` branch
4+
* Developers clone the central repository
5+
* Work in local copies
6+
* New commits are stored locally
7+
* Importing the remote repository's changes is optional
78

89
<center><img src="../../_images/workflows/git_centralized_workflow_01.png" alt="Centralized Workflow"/></center>
910

@@ -25,22 +26,6 @@ for integrating and sharing code changes between repositories.
2526
~~~ENDSECTION~~~
2627
2728
28-
!SLIDE smbullets
29-
# Centralized Workflow - Developers
30-
31-
* Developers clone the central repository
32-
* Work in local copies
33-
* New commits are stored locally
34-
* Importing the remote repository's changes is optional
35-
36-
37-
~~~SECTION:handouts~~~
38-
39-
****
40-
41-
42-
~~~ENDSECTION~~~
43-
4429
!SLIDE smbullets noprint
4530
# Centralized Workflow - Publish Changes
4631
@@ -169,7 +154,7 @@ The last parameter specifies the target directory `training2`.
169154
170155
171156
!SLIDE smbullets noprint
172-
# Centralized Workflow - Managing Conflicts Solution
157+
# Centralized Workflow - Managing Conflicts: Rebase History
173158
174159
* Fetch the remote history
175160
* Rebase local changes on top of it
@@ -178,7 +163,7 @@ The last parameter specifies the target directory `training2`.
178163
<center><img src="../../_images/workflows/git_centralized_workflow_04_example.png" alt="Centralized Workflow"/></center>
179164
180165
!SLIDE smbullets printonly
181-
# Centralized Workflow - Managing Conflicts Solution
166+
# Centralized Workflow - Managing Conflicts: Rebase History
182167
183168
* Fetch the remote history
184169
* Rebase local changes on top of it

day2/01_Workflows/03_Feature_Branch.md

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
!SLIDE smbullets
2929
# Feature Branch Workflow - How it works
3030
31-
* Central repository
3231
* Create a new branch for each feature
3332
* Descriptive branch names, e.g. `feature/docs-workflows`
3433
* Changes in a feature branch similar to centralized workflow

day2/01_Workflows/04_Gitflow.md

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@
1717
1818
~~~ENDSECTION~~~
1919
20-
!SLIDE smbullets noprint
21-
# Gitflow Workflow
22-
23-
<center><img src="../../_images/workflows/git_gitflow_workflow_01.png" alt="Gitflow Workflow"/></center>
24-
25-
!SLIDE smbullets printonly
26-
# Gitflow Workflow
27-
28-
<center><img src="../../_images/workflows/git_gitflow_workflow_01.png" style="width:480px;height:263px" alt="Gitflow Workflow"/></center>
29-
3020
!SLIDE smbullets noprint
3121
# Gitflow Workflow - Historical Branches
3222

day2/01_Workflows/06_Github_Flow.md

+6-31
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
11
!SLIDE smbullets
22
# Forking Workflow with GitHub
33

4-
* Every developer has
5-
* a server-side repository
6-
* a private repository as copy of the server-side repo
7-
* Developers push their own server-side repository
8-
* Project maintainer pushes to official repository
9-
10-
<center><img src="../../_images/workflows/git_forking_workflow_01.png" alt="Forking Workflow"/></center>
11-
12-
~~~SECTION:handouts~~~
13-
14-
****
15-
16-
17-
~~~ENDSECTION~~~
18-
19-
!SLIDE smbullets
20-
# Forking Workflow - How it works
21-
22-
* Developers fork, commit and push into their own repository
23-
* Developers create a `Pull Request` for the official repository, CI triggers automated tests for the PR
4+
* Fork aka "create a copy" of the server-side repository
5+
* Commit and push into own repository copy
6+
* Create a `Pull Request` for original repo, CI runs automated tests
247
* Developers/Maintainers review and merge PR, CI triggers deployment task
258

269
<center><img src="../../_images/workflows/git_github_workflow.png" alt="GitHub Workflow"/></center>
@@ -40,26 +23,22 @@ GitLab: https://docs.gitlab.com/ce/workflow/forking_workflow.html
4023
# Forking Workflow - Multiple Remote Repositories
4124
4225
* **Multiple** remote repositories
43-
* `origin` is yours, e.g. git@github.com:dnsmichi/icinga2.git
26+
* `origin` is yours, e.g. https://github.com:dnsmichi/icinga2.git
4427
* `upstream` is official with releases, e.g. https://github.com/icinga/icinga2.git
4528
* Merge branches from `origin/<branch>` to `upstream/<branch>` and vice versa
4629
4730
Example:
4831
4932
$ git remote -v
50-
origin git@github.com:dnsmichi/icinga2.git (fetch)
51-
origin git@github.com:dnsmichi/icinga2.git (push)
33+
origin https://github.com:dnsmichi/icinga2.git (fetch)
34+
origin https://github.com:dnsmichi/icinga2.git (push)
5235
upstream https://github.com/icinga/icinga2.git (fetch)
5336
upstream https://github.com/icinga/icinga2.git (push)
5437
5538
~~~SECTION:handouts~~~
5639
5740
****
5841
59-
60-
~~~ENDSECTION~~~
61-
62-
!SLIDE smbullets
6342
# Forking Workflow - Keep in Sync
6443
6544
* Pull changes from `upstream` HEAD to own repository master branch to sync development
@@ -73,10 +52,6 @@ Example:
7352
$ git pull upstream HEAD
7453
$ git push origin master
7554
76-
~~~SECTION:handouts~~~
77-
78-
****
79-
8055
8156
~~~ENDSECTION~~~
8257

day2/01_Workflows/07_Gitlab_Workflow.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
!SLIDE smbullets
22
# GitLab Workflow
33

4-
* Manage roles and permissions
5-
* Developers create `Merge Requests` from branches, tests and CI builds run automatically
4+
* Manage branch access with roles and permissions
5+
* Create `Merge Requests` from branches, CI runs tests/builds automatically
66
* Review and inline code comments
77
* Project maintainer merges requests and manages issues/milestones/releases
88

Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
!SLIDE smbullets
2-
# Practical Examples for Git Workflows
1+
!SLIDE smbullets small
2+
# Workflow Examples: Icinga 2
33

4-
If you are using GitHub/GitLab repositories, use forking and pull/merge requests.
4+
* Feature branch workflow
5+
* `master` as development branch
6+
* Major releases from `master`, `support/x.y` for bugfix releases
57

6-
Smart adoptions of the Gitflow workflow could include the following:
8+
Moving to GitHub, we extended this to:
79

8-
* development branch (`master`)
9-
* release branches (`support/<version>`)
10-
* Fix and feature branches are based off the `master` branch
11-
* Bugfixes are cherry-picked into the release branches
10+
* (WIP) Pull Requests, local and community forks
11+
* Travis CI (Linux) & Appveyor (Windows) automated tests
12+
* Developers review and approve PRs, maintainer merges
13+
* Maintainer prepares and publishes a release
14+
15+
https://github.com/Icinga/icinga2/blob/master/CONTRIBUTING.md
16+
https://github.com/Icinga/icinga2/blob/master/RELEASE.md
1217

1318

1419
~~~SECTION:handouts~~~
@@ -18,3 +23,21 @@ Smart adoptions of the Gitflow workflow could include the following:
1823
1924
~~~ENDSECTION~~~
2025
26+
27+
!SLIDE smbullets small
28+
# Workflow Examples: Icinga Exchange
29+
30+
* Issue management in GitLab with milestones and boards
31+
* Developers create Merge Requests from local branches
32+
* CI jobs run unit and Mock tests (GitHub oauth, etc.)
33+
* Maintainer reviews MRs and merges
34+
* Maintainer creates a new release
35+
* Manual deployment via Puppet and release tags
36+
37+
38+
~~~SECTION:handouts~~~
39+
40+
****
41+
42+
43+
~~~ENDSECTION~~~

0 commit comments

Comments
 (0)