没有合适的资源?快使用搜索试试~ 我知道了~
首页docker Gitlab持续集成CICD
资源详情
资源评论
资源推荐
Wx 1057718341 Docker Gitlab 持续集成 CICD
Docker Gitlab 持续集成 CICD
(版本:V1.0)
2 0 2 1 年 0 7 月
文档更改历史记录
序号
主要更改内容
版本号
更改人
更改时间
1
创建
V1.0
wangsh
2021-07-19
2
3
4
Wx 1057718341 Docker Gitlab 持续集成 CICD
目录
1. docker 安装 GitLab
................................................................................................................
4
1.1. 拉取镜像
........................................................................................................................
4
1.2. 创建挂载目录
................................................................................................................
5
1.3. 启动容器
........................................................................................................................
6
1.4. Gitlab 服务命令
..............................................................................................................
7
1.5. 配置 ssh 链接地址
.........................................................................................................
8
1.6. 配置 http 链接地址
.......................................................................................................
9
1.7. 重置超级管理员账号密码
..........................................................................................
11
1.8. 测试
..............................................................................................................................
12
1.9. 其他设置
......................................................................................................................
15
设置 SSH 密钥
.................................................................................................................
15
设置中文
..........................................................................................................................
17
取消用户注册
..................................................................................................................
17
添加账号
..........................................................................................................................
18
创建分组
..........................................................................................................................
21
邮件配置
..........................................................................................................................
23
1.10. 安装错误
....................................................................................................................
25
Whoops, GitLab is taking too much time to respond
..................................................
25
iptables: No chain/target/match by that name
............................................................
25
ERROR: "rails console" was called with arguments ["production"]
(Thor::InvocationError)
....................................................................................................
26
Error importing repository into root/daison-admin - No such file or directory @
rb_sysopen - [FILTERED]
.................................................................................................
28
There was an error running gitlab-ctl reconfigure
......................................................
28
GitLab external URL must include a schema and FQDN, e.g.
http://gitlab.example.com/
.............................................................................................
29
2. docker 安装 GitLab Runner
................................................................................................
29
2.1. 拉取镜像
......................................................................................................................
30
2.2. 创建挂载目录
..............................................................................................................
31
2.3. 启动容器
......................................................................................................................
31
2.4. 注册 gitlab-runner
......................................................................................................
33
Wx 1057718341 Docker Gitlab 持续集成 CICD
2.5. 修改 Runner 配置文件
................................................................................................
37
2.6. 创建 SpringBoot 项目测试 CICD
...............................................................................
39
1、 项目结构
..................................................................................................................
40
2、 配置 docker
..............................................................................................................
40
3、 注册 runner
..............................................................................................................
43
4、 修改 config.toml 挂载目录
.....................................................................................
45
5、 修改项目 pom.xml,引入 docker 插件
.................................................................
45
6、 在项目根目录创建 Dockerfile 文件
.......................................................................
53
7、 项目根目录创建.gitlab-ci.yml 文件
.......................................................................
56
8、 提交代码到 gitlab
....................................................................................................
65
9、 查看打包结果
..........................................................................................................
70
2.7. 定义项目构建流程
......................................................................................................
71
2.8. 安装错误
......................................................................................................................
72
ERROR: Failed to load config stat /etc/gitlab-runner/config.toml: no such file or
directory builds=0
........................................................................................................
72
Using locally found image version due to "if-not-present" pull policy
.....................
72
Could not transfer artifact com.jayway.jsonpath:json-path:jar:2.4.0
..........................
73
ERROR: Runner http://192.168.0.87:8880/j7jVRMZfo5srqW1TWEgL is not healthy
and will be disabled!
.......................................................................................................
73
"Can't close tar writer: io: read/write on closed pipe
...................................................
73
unable to find valid certification path to requested target
.........................................
74
on project spring-demo: Exception caught: no basic auth credentials
.....................
75
Error response from daemon: Get http://192.168.0.87:8075/v2/: dial tcp
192.168.0.87:8075: connect: connection refused
.........................................................
76
3. Springboot 项目 Gitlab 使用
..............................................................................................
77
3.1. 安装 maven 插件
.........................................................................................................
77
3.2. 安装 Git 插件
...............................................................................................................
78
3.3. 使用 Git 检出项目
.......................................................................................................
79
通过 idea 检出项目
.........................................................................................................
79
通过 git gui 客户端检出项目
.........................................................................................
84
4. Git 常用命令总结
................................................................................................................
87
Wx 1057718341 Docker Gitlab 持续集成 CICD
1. docker 安装 GitLab
机器配置:
机器
IP 地址
端口
备注
Centos7.4
192.168.0.87
Docker-20.10.7
192.168.0.87
2375
gitlab-runner-14.0.1
192.168.0.87
gitlab-ce-14.0.5
192.168.0.87
8880 4222
官网:https://about.gitlab.com/install/
官方安装文档:https://docs.gitlab.com/omnibus/index.html
1.1. 拉取镜像
官网镜像地址:
https://hub.docker.com/r/gitlab/gitlab-ce/tags?page=1&ordering=last_updated
查找 GitLab 镜像:docker search gitlab
Wx 1057718341 Docker Gitlab 持续集成 CICD
拉取 gitlab docker 镜像: docker pull gitlab/gitlab-ce:latest
查看本地镜像: docker images;
1.2. 创建挂载目录
mkdir -p /home/data/gitlab/{data,logs,conf}
chmod 777 -R /home/data/gitlab/
剩余91页未读,继续阅读
starsky20
- 粉丝: 152
- 资源: 35
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0