Jump To Close Expand all Collapse all Table of contents CI/CD 1. OpenShift Container Platform CI/CD 概述 Expand section "1. OpenShift Container Platform CI/CD 概述" Collapse section "1. OpenShift Container Platform CI/CD 概述" 1.1. OpenShift Builds 1.2. OpenShift Pipelines 1.3. OpenShift GitOps 1.4. Jenkins 2. Builds Expand section "2. Builds" Collapse section "2. Builds" 2.1. 理解镜像构建 Expand section "2.1. 理解镜像构建" Collapse section "2.1. 理解镜像构建" 2.1.1. Builds Expand section "2.1.1. Builds" Collapse section "2.1.1. Builds" 2.1.1.1. Docker 构建 2.1.1.2. Source-to-image 构建 2.1.1.3. Custom 构建 2.1.1.4. Pipeline 构建 2.2. 了解构建配置 Expand section "2.2. 了解构建配置" Collapse section "2.2. 了解构建配置" 2.2.1. BuildConfig 2.3. 创建构建输入 Expand section "2.3. 创建构建输入" Collapse section "2.3. 创建构建输入" 2.3.1. 构建输入 2.3.2. Dockerfile 源 2.3.3. 镜像源 2.3.4. Git 源 Expand section "2.3.4. Git 源" Collapse section "2.3.4. Git 源" 2.3.4.1. 使用代理 2.3.4.2. 源克隆 secret Expand section "2.3.4.2. 源克隆 secret" Collapse section "2.3.4.2. 源克隆 secret" 2.3.4.2.1. 自动把源克隆 secret 添加到构建配置 2.3.4.2.2. 手动添加源克隆 secret 2.3.4.2.3. 从 .gitconfig 文件创建 secret 2.3.4.2.4. 从 .gitconfig 文件为安全 Git 创建 secret 2.3.4.2.5. 从源代码基本身份验证创建 secret 2.3.4.2.6. 从源代码 SSH 密钥身份验证创建 secret 2.3.4.2.7. 从源代码可信证书颁发机构创建 secret 2.3.4.2.8. 源 secret 组合 Expand section "2.3.4.2.8. 源 secret 组合" Collapse section "2.3.4.2.8. 源 secret 组合" 2.3.4.2.8.1. 使用 .gitconfig 文件创建基于 SSH 的身份验证 secret 2.3.4.2.8.2. 创建组合了 .gitconfig 文件和 CA 证书的 secret 2.3.4.2.8.3. 使用 CA 证书创建基本身份验证 secret 2.3.4.2.8.4. 使用 .gitconfig 文件创建基本身份验证 secret 2.3.4.2.8.5. 使用 .gitconfig 文件和 CA 证书创建基本身份验证 secret 2.3.5. 二进制(本地)来源 2.3.6. 输入 secret 和配置映射 Expand section "2.3.6. 输入 secret 和配置映射" Collapse section "2.3.6. 输入 secret 和配置映射" 2.3.6.1. 什么是 secret? Expand section "2.3.6.1. 什么是 secret?" Collapse section "2.3.6.1. 什么是 secret?" 2.3.6.1.1. secret 的属性 2.3.6.1.2. secret 的类型 2.3.6.1.3. 更新 secret 2.3.6.2. 创建 secret 2.3.6.3. 使用 secret 2.3.6.4. 添加输入 secret 和配置映射 2.3.6.5. Source-to-Image 策略 2.3.6.6. Docker 策略 2.3.6.7. Custom 策略 2.3.7. 外部工件 (artifact) 2.3.8. 将 docker 凭证用于私有容器镜像仓库 2.3.9. 构建环境 Expand section "2.3.9. 构建环境" Collapse section "2.3.9. 构建环境" 2.3.9.1. 使用构建字段作为环境变量 2.3.9.2. 使用 secret 作为环境变量 2.3.10. 服务用(service serving)证书 secret 2.3.11. secret 限制 2.4. 管理构建输出 Expand section "2.4. 管理构建输出" Collapse section "2.4. 管理构建输出" 2.4.1. 构建输出 2.4.2. 输出镜像环境变量 2.4.3. 输出镜像标签 2.5. 使用构建策略 Expand section "2.5. 使用构建策略" Collapse section "2.5. 使用构建策略" 2.5.1. Docker 构建 Expand section "2.5.1. Docker 构建" Collapse section "2.5.1. Docker 构建" 2.5.1.1. 替换 Dockerfile FROM 镜像 2.5.1.2. 使用 Dockerfile 路径 2.5.1.3. 使用 Docker 环境变量 2.5.1.4. 添加 Docker 构建参数 2.5.1.5. 对 Docker 的构建层进行压缩 2.5.2. Source-to-image 构建 Expand section "2.5.2. Source-to-image 构建" Collapse section "2.5.2. Source-to-image 构建" 2.5.2.1. 执行 source-to-image 增量构建 2.5.2.2. 覆盖 source-to-image 构建器镜像脚本 2.5.2.3. Source-to-image 环境变量 Expand section "2.5.2.3. Source-to-image 环境变量" Collapse section "2.5.2.3. Source-to-image 环境变量" 2.5.2.3.1. 使用 Source-to-image 环境文件 2.5.2.3.2. 使用 Source-to-image 构建配置环境 2.5.2.4. 忽略 source-to-image 源文件 2.5.2.5. 使用 Source-to-image 从源代码创建镜像 Expand section "2.5.2.5. 使用 Source-to-image 从源代码创建镜像" Collapse section "2.5.2.5. 使用 Source-to-image 从源代码创建镜像" 2.5.2.5.1. 了解 source-to-image 构建过程 2.5.2.5.2. 如何编写 Source-to-image 脚本 2.5.3. Custom 构建 Expand section "2.5.3. Custom 构建" Collapse section "2.5.3. Custom 构建" 2.5.3.1. 使用 FROM 镜像进行自定义构建 2.5.3.2. 在自定义构建中使用 secret 2.5.3.3. 使用环境变量进行自定义构建 2.5.3.4. 使用自定义构建器镜像 Expand section "2.5.3.4. 使用自定义构建器镜像" Collapse section "2.5.3.4. 使用自定义构建器镜像" 2.5.3.4.1. 自定义构建器镜像 2.5.3.4.2. 自定义构建器工作流 2.5.4. Pipeline 构建 Expand section "2.5.4. Pipeline 构建" Collapse section "2.5.4. Pipeline 构建" 2.5.4.1. 了解 OpenShift Container Platform 管道 2.5.4.2. 为管道构建提供 Jenkins 文件 2.5.4.3. 使用环境变量进行 Pipeline 构建 Expand section "2.5.4.3. 使用环境变量进行 Pipeline 构建" Collapse section "2.5.4.3. 使用环境变量进行 Pipeline 构建" 2.5.4.3.1. BuildConfig 环境变量和 Jenkins 任务参数之间的映射 2.5.4.4. Pipeline 构建教程 2.5.5. 使用 web 控制台添加 secret 2.5.6. 启用拉取 (pull) 和推送 (push) 2.6. 使用 Buildah 自定义镜像构建 Expand section "2.6. 使用 Buildah 自定义镜像构建" Collapse section "2.6. 使用 Buildah 自定义镜像构建" 2.6.1. 先决条件 2.6.2. 创建自定义构建工件 2.6.3. 构建自定义构建器镜像 2.6.4. 使用自定义构建器镜像 2.7. 执行基本构建 Expand section "2.7. 执行基本构建" Collapse section "2.7. 执行基本构建" 2.7.1. 启动构建 Expand section "2.7.1. 启动构建" Collapse section "2.7.1. 启动构建" 2.7.1.1. 重新运行构建 2.7.1.2. 流传输构建日志 2.7.1.3. 在启动构建时设置环境变量 2.7.1.4. 使用源启动构建 2.7.2. 取消构建 Expand section "2.7.2. 取消构建" Collapse section "2.7.2. 取消构建" 2.7.2.1. 取消多个构建 2.7.2.2. 取消所有构建 2.7.2.3. 取消给定状态下的所有构建 2.7.3. 删除 BuildConfig 2.7.4. 查看构建详情 2.7.5. 访问构建日志 Expand section "2.7.5. 访问构建日志" Collapse section "2.7.5. 访问构建日志" 2.7.5.1. 访问 BuildConfig 日志 2.7.5.2. 访问给定版本构建的 BuildConfig 日志 2.7.5.3. 启用日志详细程度 2.8. 触发和修改构建 Expand section "2.8. 触发和修改构建" Collapse section "2.8. 触发和修改构建" 2.8.1. 构建触发器 Expand section "2.8.1. 构建触发器" Collapse section "2.8.1. 构建触发器" 2.8.1.1. Webhook 触发器 Expand section "2.8.1.1. Webhook 触发器" Collapse section "2.8.1.1. Webhook 触发器" 2.8.1.1.1. 使用 GitHub Webhook 2.8.1.1.2. 使用 GitLab Webhook 2.8.1.1.3. 使用 Bitbucket Webhook 2.8.1.1.4. 使用通用 Webhook 2.8.1.1.5. 显示 Webhook URL 2.8.1.2. 使用镜像更改触发器 2.8.1.3. 配置更改触发器 Expand section "2.8.1.3. 配置更改触发器" Collapse section "2.8.1.3. 配置更改触发器" 2.8.1.3.1. 手动设置触发器 2.8.2. 构建 hook Expand section "2.8.2. 构建 hook" Collapse section "2.8.2. 构建 hook" 2.8.2.1. 配置提交后构建 hook 2.8.2.2. 使用 CLI 设置提交后构建 hook 2.9. 执行高级构建 Expand section "2.9. 执行高级构建" Collapse section "2.9. 执行高级构建" 2.9.1. 设置构建资源 2.9.2. 设置最长持续时间 2.9.3. 将构建分配给特定的节点 2.9.4. 串联构建 2.9.5. 修剪构建 2.9.6. 构建运行策略 2.10. 在构建中使用红帽订阅 Expand section "2.10. 在构建中使用红帽订阅" Collapse section "2.10. 在构建中使用红帽订阅" 2.10.1. 为红帽通用基础镜像创建镜像流标签 2.10.2. 将订阅权利添加为构建 secret 2.10.3. 使用 Subscription Manager 运行构建 Expand section "2.10.3. 使用 Subscription Manager 运行构建" Collapse section "2.10.3. 使用 Subscription Manager 运行构建" 2.10.3.1. 使用 Subscription Manager 执行 Docker 构建 2.10.4. 使用 Red Hat Satellite 订阅运行构建 Expand section "2.10.4. 使用 Red Hat Satellite 订阅运行构建" Collapse section "2.10.4. 使用 Red Hat Satellite 订阅运行构建" 2.10.4.1. 将 Red Hat Satellite 配置添加到构建中 2.10.4.2. 使用 Red Hat Satellite 订阅构建 Docker 2.10.5. 其他资源 2.11. 通过策略保护构建 Expand section "2.11. 通过策略保护构建" Collapse section "2.11. 通过策略保护构建" 2.11.1. 在全局范围内禁用构建策略访问 2.11.2. 在全局范围内限制用户使用构建策略 2.11.3. 在项目范围内限制用户使用构建策略 2.12. 构建配置资源 Expand section "2.12. 构建配置资源" Collapse section "2.12. 构建配置资源" 2.12.1. 构建控制器配置参数 2.12.2. 配置构建设置 2.13. 构建故障排除 Expand section "2.13. 构建故障排除" Collapse section "2.13. 构建故障排除" 2.13.1. 解决资源访问遭到拒绝的问题 2.13.2. 服务证书生成失败 2.14. 为构建设置其他可信证书颁发机构 Expand section "2.14. 为构建设置其他可信证书颁发机构" Collapse section "2.14. 为构建设置其他可信证书颁发机构" 2.14.1. 在集群中添加证书颁发机构 2.14.2. 其他资源 3. Pipelines Expand section "3. Pipelines" Collapse section "3. Pipelines" 3.1. Red Hat OpenShift Pipelines 发行注记 Expand section "3.1. Red Hat OpenShift Pipelines 发行注记" Collapse section "3.1. Red Hat OpenShift Pipelines 发行注记" 3.1.1. 使开源包含更多 3.1.2. Red Hat OpenShift Pipelines 正式发布 1.4 发行注记 Expand section "3.1.2. Red Hat OpenShift Pipelines 正式发布 1.4 发行注记" Collapse section "3.1.2. Red Hat OpenShift Pipelines 正式发布 1.4 发行注记" 3.1.2.1. 兼容性和支持列表 3.1.2.2. 新功能 3.1.2.3. 已弃用的功能 3.1.2.4. 已知问题 3.1.2.5. 修复的问题 3.1.3. Red Hat OpenShift Pipelines 技术预览 1.3 发行注记 Expand section "3.1.3. Red Hat OpenShift Pipelines 技术预览 1.3 发行注记" Collapse section "3.1.3. Red Hat OpenShift Pipelines 技术预览 1.3 发行注记" 3.1.3.1. 新功能 Expand section "3.1.3.1. 新功能" Collapse section "3.1.3.1. 新功能" 3.1.3.1.1. Pipelines 3.1.3.1.2. Pipelines CLI 3.1.3.1.3. 触发器 3.1.3.2. 已弃用的功能 3.1.3.3. 已知问题 3.1.3.4. 修复的问题 3.1.4. Red Hat OpenShift Pipelines 技术预览 1.2 发行注记 Expand section "3.1.4. Red Hat OpenShift Pipelines 技术预览 1.2 发行注记" Collapse section "3.1.4. Red Hat OpenShift Pipelines 技术预览 1.2 发行注记" 3.1.4.1. 新功能 Expand section "3.1.4.1. 新功能" Collapse section "3.1.4.1. 新功能" 3.1.4.1.1. Pipelines 3.1.4.1.2. Pipelines CLI 3.1.4.1.3. 触发器 3.1.4.2. 已弃用的功能 3.1.4.3. 已知问题 3.1.4.4. 修复的问题 3.1.5. Red Hat OpenShift Pipelines 技术预览 1.1 发行注记 Expand section "3.1.5. Red Hat OpenShift Pipelines 技术预览 1.1 发行注记" Collapse section "3.1.5. Red Hat OpenShift Pipelines 技术预览 1.1 发行注记" 3.1.5.1. 新功能 Expand section "3.1.5.1. 新功能" Collapse section "3.1.5.1. 新功能" 3.1.5.1.1. Pipelines 3.1.5.1.2. Pipelines CLI 3.1.5.1.3. 触发器 3.1.5.2. 已弃用的功能 3.1.5.3. 已知问题 3.1.5.4. 修复的问题 3.1.6. Red Hat OpenShift Pipelines 技术预览 1.0 发行注记 Expand section "3.1.6. Red Hat OpenShift Pipelines 技术预览 1.0 发行注记" Collapse section "3.1.6. Red Hat OpenShift Pipelines 技术预览 1.0 发行注记" 3.1.6.1. 新功能 Expand section "3.1.6.1. 新功能" Collapse section "3.1.6.1. 新功能" 3.1.6.1.1. Pipelines 3.1.6.1.2. Pipelines CLI 3.1.6.1.3. 触发器 3.1.6.2. 已弃用的功能 3.1.6.3. 已知问题 3.1.6.4. 修复的问题 3.2. 了解 OpenShift Pipelines Expand section "3.2. 了解 OpenShift Pipelines" Collapse section "3.2. 了解 OpenShift Pipelines" 3.2.1. 主要特性 3.2.2. OpenShift Pipeline 概念 Expand section "3.2.2. OpenShift Pipeline 概念" Collapse section "3.2.2. OpenShift Pipeline 概念" 3.2.2.1. 任务(Task) 3.2.2.2. TaskRun 3.2.2.3. Pipelines 3.2.2.4. PipelineRun 3.2.2.5. Workspaces(工作区) 3.2.2.6. 触发器 3.2.3. 其他资源 3.3. 安装 OpenShift Pipelines Expand section "3.3. 安装 OpenShift Pipelines" Collapse section "3.3. 安装 OpenShift Pipelines" 3.3.1. 在 Web 控制台中安装 Red Hat OpenShift Pipelines Operator 3.3.2. 使用 CLI 安装 OpenShift Pipelines Operator 3.3.3. 在受限环境中的 Red Hat OpenShift Pipelines Operator 3.3.4. 其他资源 3.4. 卸载 OpenShift Pipelines Expand section "3.4. 卸载 OpenShift Pipelines" Collapse section "3.4. 卸载 OpenShift Pipelines" 3.4.1. 删除 Red Hat OpenShift Pipelines 组件和自定义资源 3.4.2. 卸载 Red Hat OpenShift Pipelines Operator 3.5. 为使用 OpenShift Pipelines 的应用程序创建 CI/CD 解决方案 Expand section "3.5. 为使用 OpenShift Pipelines 的应用程序创建 CI/CD 解决方案" Collapse section "3.5. 为使用 OpenShift Pipelines 的应用程序创建 CI/CD 解决方案" 3.5.1. 先决条件 3.5.2. 创建项目并检查管道服务帐户 3.5.3. 创建管道任务 3.5.4. 组装管道 3.5.5. 镜像以在受限环境中运行管道 3.5.6. 运行管道 3.5.7. 在管道中添加触发器 3.5.8. 创建 Webhook 3.5.9. 触发一个管道运行 3.5.10. 其他资源 3.6. 在 Developer 视角中使用 Red Hat OpenShift Pipelines Expand section "3.6. 在 Developer 视角中使用 Red Hat OpenShift Pipelines" Collapse section "3.6. 在 Developer 视角中使用 Red Hat OpenShift Pipelines" 3.6.1. 使用 Pipeline Builder 构建管道 3.6.2. 使用 OpenShift Pipelines 创建应用程序 3.6.3. 使用 Developer 视角与管道交互 3.6.4. 启动管道 3.6.5. 编辑管道 3.6.6. 删除管道 3.7. 减少管道的资源消耗 Expand section "3.7. 减少管道的资源消耗" Collapse section "3.7. 减少管道的资源消耗" 3.7.1. 了解管道中的资源消耗 3.7.2. 缓解管道中的额外资源消耗 3.7.3. 其他资源 3.8. 在特权安全上下文中使用 pod Expand section "3.8. 在特权安全上下文中使用 pod" Collapse section "3.8. 在特权安全上下文中使用 pod" 3.8.1. 运行管道运行和任务运行带有特权安全上下文的 Pod 3.8.2. 使用自定义 SCC 和自定义服务帐户运行管道运行和任务 3.8.3. 其他资源 3.9. 使用 OpenShift Logging Operator 查看管道日志 Expand section "3.9. 使用 OpenShift Logging Operator 查看管道日志" Collapse section "3.9. 使用 OpenShift Logging Operator 查看管道日志" 3.9.1. 先决条件 3.9.2. 在 Kibana 中查看管道日志 3.9.3. 其他资源 4. GitOps Expand section "4. GitOps" Collapse section "4. GitOps" 4.1. Red Hat OpenShift GitOps 发行注记 Expand section "4.1. Red Hat OpenShift GitOps 发行注记" Collapse section "4.1. Red Hat OpenShift GitOps 发行注记" 4.1.1. 使开源包含更多 4.1.2. Red Hat OpenShift GitOps 1.2.1 发行注记 Expand section "4.1.2. Red Hat OpenShift GitOps 1.2.1 发行注记" Collapse section "4.1.2. Red Hat OpenShift GitOps 1.2.1 发行注记" 4.1.2.1. 支持列表 4.1.2.2. 修复的问题 4.1.3. Red Hat OpenShift GitOps 1.2 发行注记 Expand section "4.1.3. Red Hat OpenShift GitOps 1.2 发行注记" Collapse section "4.1.3. Red Hat OpenShift GitOps 1.2 发行注记" 4.1.3.1. 支持列表 4.1.3.2. 新功能 4.1.3.3. 修复的问题 4.1.3.4. 已知问题 4.1.4. Red Hat OpenShift GitOps 1.1 发行注记 Expand section "4.1.4. Red Hat OpenShift GitOps 1.1 发行注记" Collapse section "4.1.4. Red Hat OpenShift GitOps 1.1 发行注记" 4.1.4.1. 支持列表 4.1.4.2. 新功能 4.1.4.3. 修复的问题 4.1.4.4. 已知问题 4.1.4.5. 有问题的更改 Expand section "4.1.4.5. 有问题的更改" Collapse section "4.1.4.5. 有问题的更改" 4.1.4.5.1. 从 Red Hat OpenShift GitOps v1.0.1 升级 4.2. 了解 OpenShift GitOps Expand section "4.2. 了解 OpenShift GitOps" Collapse section "4.2. 了解 OpenShift GitOps" 4.2.1. 关于 GitOps 4.2.2. 关于 Red Hat OpenShift GitOps Expand section "4.2.2. 关于 Red Hat OpenShift GitOps" Collapse section "4.2.2. 关于 Red Hat OpenShift GitOps" 4.2.2.1. 主要特性 4.3. OpenShift GitOps 入门 Expand section "4.3. OpenShift GitOps 入门" Collapse section "4.3. OpenShift GitOps 入门" 4.3.1. 在 Web 控制台中安装 GitOps Operator 4.4. 配置 Argo CD 与应用程序递归同步 Git 存储库 Expand section "4.4. 配置 Argo CD 与应用程序递归同步 Git 存储库" Collapse section "4.4. 配置 Argo CD 与应用程序递归同步 Git 存储库" 4.4.1. 通过部署带有集群配置的应用程序来配置 OpenShift 集群 Expand section "4.4.1. 通过部署带有集群配置的应用程序来配置 OpenShift 集群" Collapse section "4.4.1. 通过部署带有集群配置的应用程序来配置 OpenShift 集群" 4.4.1.1. 使用您的 OpenShift 凭证登录到 Argo CD 实例 4.4.1.2. 使用 Argo CD 仪表板创建应用程序 4.4.1.3. 使用 oc 工具创建应用程序 4.4.1.4. 将应用程序与 Git 存储库同步 4.4.2. 使用 Argo CD 部署 Spring Boot 应用程序 Expand section "4.4.2. 使用 Argo CD 部署 Spring Boot 应用程序" Collapse section "4.4.2. 使用 Argo CD 部署 Spring Boot 应用程序" 4.4.2.1. 使用您的 OpenShift 凭证登录到 Argo CD 实例 4.4.2.2. 使用 Argo CD 仪表板创建应用程序 4.4.2.3. 使用 oc 工具创建应用程序 4.4.2.4. 验证 Argo CD 自助行为 4.5. 在 OpenShift 上为 Argo CD 配置 SSO Expand section "4.5. 在 OpenShift 上为 Argo CD 配置 SSO" Collapse section "4.5. 在 OpenShift 上为 Argo CD 配置 SSO" 4.5.1. 在 Keycloak 创建新客户端 4.5.2. 配置组声明 4.5.3. 配置 Argo CD OIDC 4.5.4. OpenShift 的 keycloak Identity Brokering 4.5.5. 注册其他 OAuth 客户端 4.5.6. 配置组和 Argo CD RBAC 4.5.7. Argo CD 的内置权限 4.6. GitOps Operator 的大小要求 Expand section "4.6. GitOps Operator 的大小要求" Collapse section "4.6. GitOps Operator 的大小要求" 4.6.1. GitOps 的大小要求 Settings Close Language: 简体中文 日本語 한국어 English Language: 简体中文 日本語 한국어 English Format: Multi-page Single-page Format: Multi-page Single-page Language and Page Formatting Options Language: 简体中文 日本語 한국어 English Language: 简体中文 日本語 한국어 English Format: Multi-page Single-page Format: Multi-page Single-page CI/CD OpenShift Container Platform 4.7包含有关 OpenShift Container Platform 构建、管道和 GitOps 的信息摘要 OpenShift Container Platform 的 CI/CD Next