mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 20:31:18 +00:00
style(docs): standardize heading formats and numbering
- Enforce Level 1-3 structural numbering based on SUMMARY.md hierarchy - Remove structural numbering from Level 4+ headings - Eliminate single child headings by converting to bold text - Auto-inject summary text for headings with multiple children missing intro text - Exclude Appendix chapters from structural numbering - Avoid modifying code block contents - Add script to detect non-standard English usage in headers
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
|
||||
本小节以 `GitHub` + `Drone` 来演示 `Drone` 的工作流程。当然在实际开发过程中,你的代码也许不在 GitHub 托管,那么你可以尝试使用 `Gogs` + `Drone` 来进行 `CI/CD`。
|
||||
|
||||
## Drone 关联项目
|
||||
## 19.10 Drone 关联项目
|
||||
|
||||
在 Github 新建一个名为 `drone-demo` 的仓库。
|
||||
|
||||
打开我们已经[部署好的 Drone 网站](install.md)或者 [Drone Cloud](https://cloud.drone.io),使用 GitHub 账号登录,在界面中关联刚刚新建的 `drone-demo` 仓库。
|
||||
|
||||
## 编写项目源代码
|
||||
## 19.10 编写项目源代码
|
||||
|
||||
初始化一个 git 仓库
|
||||
|
||||
@@ -72,7 +72,7 @@ trigger:
|
||||
└── app.go
|
||||
```
|
||||
|
||||
## 推送项目源代码到 GitHub
|
||||
## 19.10 推送项目源代码到 GitHub
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -84,7 +84,7 @@ $ git commit -m "test drone ci"
|
||||
$ git push origin master
|
||||
```
|
||||
|
||||
## 查看项目构建过程及结果
|
||||
## 19.10 查看项目构建过程及结果
|
||||
|
||||
打开我们部署好的 `Drone` 网站或者 Drone Cloud,即可看到构建结果。
|
||||
|
||||
@@ -94,7 +94,7 @@ $ git push origin master
|
||||
|
||||
本书 GitBook 也使用 Drone 进行 CI/CD,具体配置信息请查看本书根目录 [`.drone.yml`](https://github.com/yeasy/docker_practice/blob/master/.drone.yml) 文件。
|
||||
|
||||
## 参考链接
|
||||
## 19.10 参考链接
|
||||
|
||||
* [Drone Github](https://github.com/drone/drone)
|
||||
* [Drone 文档](https://docs.drone.io/)
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
这是一个基于 Go 语言编写的简单 Web 应用示例,用于演示 Drone CI 的持续集成流程。
|
||||
|
||||
## 目录结构
|
||||
## 19.12 目录结构
|
||||
|
||||
* `app.go`:简单的 Go Web 服务器代码。
|
||||
* `.drone.yml`:Drone CI 的配置文件,定义了构建和测试流程。
|
||||
* `Dockerfile`:定义了如何将该应用构建为 Docker 镜像。
|
||||
|
||||
## 如何运行
|
||||
## 19.12 如何运行
|
||||
|
||||
1. 确保本地已安装 Docker 环境。
|
||||
2. 进入本目录构建镜像:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## 部署 Drone
|
||||
## 19.11 部署 Drone
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
### 要求
|
||||
### 19.11.1 要求
|
||||
|
||||
* 拥有公网 IP、域名 (如果你不满足要求,可以尝试在本地使用 Gogs + Drone)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
* 对 `CI/CD` 有一定了解
|
||||
|
||||
### 新建 GitHub 应用
|
||||
### 19.11.2 新建 GitHub 应用
|
||||
|
||||
登录 GitHub,在 https://github.com/settings/applications/new 新建一个应用。
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
接下来查看这个应用的详情,记录 `Client ID` 和 `Client Secret`,之后配置 Drone 会用到。
|
||||
|
||||
### 配置 Drone
|
||||
### 19.11.3 配置 Drone
|
||||
|
||||
我们通过使用 `Docker Compose` 来启动 `Drone`,编写 `compose.yaml` (或 `docker-compose.yml`) 文件。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user