Skip to content

Commit 5df9029

Browse files
committed
2018-02-07 补充 Docker CI
1 parent af823bc commit 5df9029

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

CI-Install-And-Usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ services:
7777
- GITLAB_HTTPS=false
7878
- SSL_SELF_SIGNED=false
7979

80-
- GITLAB_HOST=localhost
80+
- GITLAB_HOST=119.23.252.150
8181
- GITLAB_PORT=10080
8282
- GITLAB_SSH_PORT=10022
8383
- GITLAB_RELATIVE_URL_ROOT=
@@ -180,7 +180,7 @@ services:
180180
181181
- 启动:`docker-compose up -d`
182182
- 浏览器访问 Gitlab:<http://119.23.252.150:10080/users/sign_in>
183-
183+
- Gitlab 的具体使用可以看另外文章:[Gitlab 的使用](Gitlab-Install-And-Settings.md)
184184

185185
## Nexus + Jenkins + SonarQube
186186

Gitlab-Install-And-Settings.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Gitlab 安装和配置
22

3-
4-
## Docker 安装方式
5-
6-
- 命令:``
7-
83
## Docker Compose 安装方式
94

105

@@ -99,7 +94,7 @@ gitlab-postgresql:
9994
- 找到 13 行左右:`external_url 'http://gitlab.example.com'`,改为你的域名 / IP
10095
- 重启服务:`sudo gitlab-ctl reconfigure`
10196
- 前面的初始化配置完成之后,访问当前机子 IP:`http://192.168.1.111:80`
102-
- 默认用户是 root,并且没有密码,所以第一次访问是让你设置你的 root 密码,我设置为:gitlab123456(至少 8 位数)
97+
- 默认用户是 `root`,并且没有密码,所以第一次访问是让你设置你的 root 密码,我设置为:gitlab123456(至少 8 位数)
10398
- 设置会初始化密码之后,你就需要登录了。输入设置的密码。
10499
- root 管理员登录之后常用的设置地址(请求地址都是 RESTful 风格很好懂,也应该不会再变了。):
105100
- 用户管理:<http://192.168.1.111/admin/users>
@@ -179,6 +174,35 @@ gitlab-postgresql:
179174
- 也是在项目设置里面:<http://192.168.1.111/组名称/项目名称/settings/repository#>
180175
- 设置 CI (持续集成) 的 key 也是在这个地址上设置。
181176

177+
178+
## Gitlab 的其他功能使用
179+
180+
#### 创建用户
181+
182+
- 地址:<http://119.23.252.150:10080/admin/users/>
183+
- 创建用户是没有填写密码的地方,默认是创建后会发送邮件给用户进行首次使用的密码设置。但是,有时候没必要这样,你可以创建好用户之后,编辑该用户就可以强制设置密码了(即使你设置了,第一次用户使用还是要让你修改密码...真是严苛)
184+
185+
186+
#### 创建群组
187+
188+
- 地址:<http://119.23.252.150:10080/groups>
189+
- 群组主要有三种 Visibility Level:
190+
- Private(私有,内部成员才能看到),The group and its projects can only be viewed by members.
191+
- Internal(内部,只要能登录 Gitlab 就可以看到),The group and any internal projects can be viewed by any logged in user.
192+
- Public(所有人都可以看到),The group and any public projects can be viewed without any authentication.
193+
194+
#### 创建项目
195+
196+
- 地址:<http://119.23.252.150:10080/>
197+
198+
#### 增加 SSH keys
199+
200+
- 地址:<http://119.23.252.150:10080/profile/keys>
201+
- 官网指导:<http://119.23.252.150:10080/help/ssh/README>
202+
- 新增 SSH keys:`ssh-keygen -t rsa -C "gitnavi@qq.com" -b 4096`
203+
- linux 读取 SSH keys 值:`cat ~/.ssh/id_rsa.pub`,复制到 gitlab 配置页面
204+
205+
182206
## 使用 Gitlab 的一个开发流程 - Git flow
183207

184208
- Git flow:我是翻译成:Git 开发流程建议(不是规范,适合大点的团队),也有一个插件叫做这个,本质是用插件来帮你引导做规范的流程管理。

0 commit comments

Comments
 (0)