Auto-sync: update nexus workspace
This commit is contained in:
@@ -1,33 +1,58 @@
|
||||
---
|
||||
title: "Jenkins"
|
||||
type: entity
|
||||
tags: ["CI/CD", "Automation", "DevOps"]
|
||||
sources: ["learning-sessions-standard-amis-updates-20231205-160324-meeting-recording-2", "ctp-topic-26-standard-ami-build-publish-share-processes", "ctp-topic-1-gruntwork-landing-zone-architecture", "ctp-topic-7-saas-landing-zone-design"]
|
||||
last_updated: 2026-05-08
|
||||
tags:
|
||||
- CI/CD
|
||||
- Automation
|
||||
- DevOps
|
||||
sources:
|
||||
- ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments
|
||||
last_updated: 2026-04-29
|
||||
---
|
||||
|
||||
# Jenkins
|
||||
|
||||
## Overview
|
||||
Jenkins 是开源的 CI/CD 自动化服务器,在 Micro Focus AWS Landing Zone 中承担基础设施即代码(IaC)部署和 AMI 构建的双重角色。每个 Landing Zone 配置独立的 Jenkins 服务器,通过多分支流水线(Multi-Branch Pipeline)管理 Terraform/TerraGrunt 模块的 plan 和 apply 流程,以及标准 AMI 的构建和测试。
|
||||
|
||||
Jenkins 是最广泛使用的开源自动化服务器之一,在 IaC 场景中曾被用于执行 Terraform 部署流水线。然而在 Atlantis 的对比中,Jenkins 流水线暴露出多个运维痛点。
|
||||
|
||||
## In This Context
|
||||
|
||||
**[[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]]** 指出原 Jenkins 流水线存在以下问题:
|
||||
|
||||
### Speed Issues
|
||||
- 显著的初始化时间(每次构建需重新初始化环境)
|
||||
- 多次代码克隆(每个 stage 重复克隆仓库)
|
||||
- 顺序测试(无法并行化,瓶颈明显)
|
||||
- ECS Deployer 预配置耗时
|
||||
|
||||
### Complexity Issues
|
||||
- 持续叠加功能以覆盖更多场景和边缘情况
|
||||
- 架构脆弱,易产生配置漂移(drift)
|
||||
- 维护成本高,改动风险大
|
||||
|
||||
## Contrast with Atlantis
|
||||
|
||||
| Aspect | Jenkins | Atlantis |
|
||||
|--------|---------|----------|
|
||||
| Trigger Method | Push (pipeline job) | Pull (PR comment) |
|
||||
| Plan Timing | Pre-merge testing | Pre-merge apply |
|
||||
| Module Locking | Requires plugin/config | Built-in automatic |
|
||||
| Parallel Builds | Configurable, complex | Native support |
|
||||
| Setup Complexity | High (many integrations) | Low (single EC2) |
|
||||
| Cost (VPC Endpoints) | High | Low (removes many endpoints) |
|
||||
|
||||
## Aliases
|
||||
- Jenkins CI
|
||||
- Jenkins Master
|
||||
- Jenkins Slave
|
||||
- Jenkins Multi-Branch Pipeline
|
||||
- Jenkins Server
|
||||
|
||||
## Role in AWS Landing Zone
|
||||
- **Shared 账户**:托管 Jenkins 主节点(Master),通过 Lambda 触发各账户 Jenkins 从节点
|
||||
- **AMI 构建**:Jenkins 多分支流水线驱动 Packer 镜像构建,包含脚本化测试和 AWS Inspector 安全扫描
|
||||
- **IaC 部署**:扫描 GitHub 仓库变更,触发 Terraform Plan/Apply 流水线
|
||||
- **每个 LZ 独立**:Gruntwork 参考架构中每个 Landing Zone 有自己的 Jenkins 服务器
|
||||
## Related Concepts
|
||||
- [[CI/CD Pipeline]]:Jenkins 和 Atlantis 都属于 CI/CD 工具范畴
|
||||
- [[GitOps]]:Atlantis 更贴近 GitOps 理念,Jenkins 为传统 Push 模型
|
||||
- [[Infrastructure as Code (IaC)]]:两者均可用于 IaC 部署
|
||||
|
||||
## Key Processes
|
||||
- Feature Branch Pipeline:功能分支开发 → 合并到集成分支 → 构建测试 → 发布
|
||||
- Jenkinsfile 定义构建、测试、发布各阶段
|
||||
- 与 GitHub 集成实现自动化触发
|
||||
## Related Entities
|
||||
- [[Atlantis]]:在 IaC 部署场景下替代 Jenkins 的方案
|
||||
|
||||
## Connections
|
||||
- [[AWS-Landing-Zone]] — Jenkins 是核心自动化基础设施
|
||||
- [[Terraform-IaC]] — Jenkins 流水线编排 Terraform 部署
|
||||
- [[Terragrunt]] — 与 Jenkins 配合的 IaC 工具
|
||||
- [[Gruntwork]] — Gruntwork 参考架构中的 Jenkins 配置模式
|
||||
## References
|
||||
- [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]]
|
||||
|
||||
Reference in New Issue
Block a user