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 构建 1.2. OpenShift Pipelines 1.3. OpenShift GitOps 1.4. Jenkins 2. 构建(build) Expand section "2. 构建(build)" Collapse section "2. 构建(build)" 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 构建的 Squash 层 2.5.1.6. 使用构建卷 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.2.6. 使用构建卷 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. 删除 BuildConfig 2.7.5. 查看构建详情 2.7.6. 访问构建日志 Expand section "2.7.6. 访问构建日志" Collapse section "2.7.6. 访问构建日志" 2.7.6.1. 访问 BuildConfig 日志 2.7.6.2. 访问给定版本构建的 BuildConfig 日志 2.7.6.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. 识别构建的镜像更改触发器 2.8.1.4. 配置更改触发器 Expand section "2.8.1.4. 配置更改触发器" Collapse section "2.8.1.4. 配置更改触发器" 2.8.1.4.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. 使用 SharedSecret 对象运行授权构建 2.10.6. 其他资源 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 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. 其他资源 5. Jenkins Expand section "5. Jenkins" Collapse section "5. Jenkins" 5.1. 配置 Jenkins 镜像 Expand section "5.1. 配置 Jenkins 镜像" Collapse section "5.1. 配置 Jenkins 镜像" 5.1.1. 配置和自定义 Expand section "5.1.1. 配置和自定义" Collapse section "5.1.1. 配置和自定义" 5.1.1.1. OpenShift Container Platform OAuth 身份验证 5.1.1.2. Jenkins 身份验证 5.1.2. Jenkins 环境变量 5.1.3. 向 Jenkins 提供跨项目访问权限 5.1.4. Jenkins 跨卷挂载点 5.1.5. 通过 Source-to-image 自定义 Jenkins 镜像 5.1.6. 配置 Jenkins Kubernetes 插件 5.1.7. Jenkins 权限 5.1.8. 从模板创建 Jenkins 服务 5.1.9. 使用 Jenkins Kubernetes 插件 5.1.10. Jenkins 内存要求 5.1.11. 其他资源 5.2. Jenkins 代理 Expand section "5.2. Jenkins 代理" Collapse section "5.2. Jenkins 代理" 5.2.1. Jenkins 代理镜像 5.2.2. Jenkins 代理环境变量 5.2.3. Jenkins 代理内存要求 5.2.4. Jenkins 代理 Gradle 构建 5.2.5. Jenkins 代理 pod 保留 5.3. 从 Jenkins 迁移到 OpenShift Pipelines 或 Tekton Expand section "5.3. 从 Jenkins 迁移到 OpenShift Pipelines 或 Tekton" Collapse section "5.3. 从 Jenkins 迁移到 OpenShift Pipelines 或 Tekton" 5.3.1. Jenkins 和 OpenShift Pipelines 概念的比较 Expand section "5.3.1. Jenkins 和 OpenShift Pipelines 概念的比较" Collapse section "5.3.1. Jenkins 和 OpenShift Pipelines 概念的比较" 5.3.1.1. Jenkins 术语 5.3.1.2. OpenShift Pipelines 术语 5.3.1.3. 概念映射 5.3.2. 将示例管道从 Jenkins 迁移到 OpenShift Pipelines Expand section "5.3.2. 将示例管道从 Jenkins 迁移到 OpenShift Pipelines" Collapse section "5.3.2. 将示例管道从 Jenkins 迁移到 OpenShift Pipelines" 5.3.2.1. Jenkins 管道 5.3.2.2. OpenShift Pipelines 管道 5.3.3. 从 Jenkins 插件迁移到 Tekton Hub 任务 5.3.4. 使用自定义任务和脚本扩展 OpenShift Pipelines 功能 5.3.5. Jenkins 和 OpenShift Pipelines 执行模型的比较 5.3.6. 常见使用案例示例 Expand section "5.3.6. 常见使用案例示例" Collapse section "5.3.6. 常见使用案例示例" 5.3.6.1. 在 Jenkins 和 OpenShift Pipelines 中运行 Maven 管道 5.3.6.2. 使用插件扩展 Jenkins 和 OpenShift Pipelines 的核心功能 5.3.6.3. 在 Jenkins 和 OpenShift Pipelines 中共享可重复使用的代码 5.3.7. 其他资源 5.4. OpenShift Jenkins 镜像的重要变化 Expand section "5.4. OpenShift Jenkins 镜像的重要变化" Collapse section "5.4. OpenShift Jenkins 镜像的重要变化" 5.4.1. OpenShift Jenkins 镜像重新定位 5.4.2. 自定义 Jenkins 镜像流标签 5.4.3. 其他资源 法律通告 Settings Close Language: 简体中文 한국어 日本語 English Français Language: 简体中文 한국어 日本語 English Français Format: Multi-page Single-page Format: Multi-page Single-page Language and Page Formatting Options Language: 简体中文 한국어 日本語 English Français Language: 简体中文 한국어 日本語 English Français Format: Multi-page Single-page Format: Multi-page Single-page CI/CD OpenShift Container Platform 4.12包含有关 OpenShift Container Platform 构建、管道和 GitOps 的信息 Red Hat OpenShift Documentation Team法律通告摘要 OpenShift Container Platform 的 CI/CD Next