提交 b2443339 编写于 作者: LinuxSuRen's avatar LinuxSuRen

deploy

上级 492510fa
......@@ -39,7 +39,7 @@
<meta itemprop="datePublished" content="2019-01-05T22:56:04&#43;08:00" />
<meta itemprop="dateModified" content="2019-01-05T22:56:04&#43;08:00" />
<meta itemprop="wordCount" content="43">
<meta itemprop="wordCount" content="51">
......@@ -166,6 +166,7 @@
<nav id="TableOfContents">
<ul>
<li><a href="#jenkins-本地化">Jenkins 本地化</a></li>
<li><a href="#新手-bug">新手 Bug</a></li>
<li><a href="#分享">分享</a></li>
<li><a href="#维护本站点">维护本站点</a></li>
</ul>
......@@ -273,6 +274,13 @@
<a href="https://github.com/jenkinsci/localization-zh-cn-plugin/pulls" target="_blank">Pull Request</a>
</p>
<h1 id="新手-bug">新手 Bug</h1>
<p>如果你之前没有参与过 Jenkins 的贡献或者对如何开始不太情况,可以查看
<a href="https://issues.jenkins-ci.org/issues/?jql=labels%20%3D%20newbie-friendly%20AND%20%28status%20%3D%20Open%20OR%20status%20%3D%20%22To%20Do%22%20OR%20status%20%3D%20Reopened%20%29" target="_blank">新手 Bug</a>
。这是一些相对比较简单,容易修改的问题。</p>
<h1 id="分享">分享</h1>
<p>你可以在本站或者 <a href="https://jenkins-zh.github.io/about/meetups/">Mettup</a> 上分享你在使用 Jenkins 或者相关技术时总结的经验、教训、成果等。</p>
......
......@@ -34,6 +34,7 @@ GitHub 请您使用同一个 GitHub 账号来与大家交流,不欢迎使用
Jenkins 本地化 Jenkins 中文官网 有很多的 翻译任务 需要各路英雄自由领取。无规矩不成方圆,在享受自由的同时,也请牢记如下几点:
认真、负责第一位 翻译任务通常不建议超过两周 翻译规范 翻译包括 Jenkins 官网的本地化,以及 博客 的翻译。翻译完成后,提交 Pull Request 并等待 Review。对于质量较高、或者适合在微信公众号上发布的文章,需要另外提交一个 Pull Request 。
Jenkins 的 简体中文语言插件 也热切地期待你的 Pull Request 。
新手 Bug 如果你之前没有参与过 Jenkins 的贡献或者对如何开始不太情况,可以查看 新手 Bug 。这是一些相对比较简单,容易修改的问题。
分享 你可以在本站或者 Mettup 上分享你在使用 Jenkins 或者相关技术时总结的经验、教训、成果等。
维护本站点 你可以从了解本站的架构开始。小到错别字修正,大到站点风格、架构完善都需要你的参与。</description>
</item>
......
......@@ -11,7 +11,7 @@
"title": "如何参与",
"tags": [],
"description": "不满意只做吃瓜群众的请看过来",
"content": " 参与开源社区真的不只有 Coding 一条路可选。只要你认同“开源”,有热情,就可以!任何岗位、校大学生、甚至\u0026rdquo;不懂\u0026rdquo;技术都能够加入我们。走过路过的朋友们别错过,下面的参与方式总有一种能把你带上开源事业的“不归路”,如果真的没有包含你希望的参与方式,也可以从现在就发起一个 Pull Request 开始:\nJenkins 本地化 Jenkins 中文官网 有很多的 翻译任务 需要各路英雄自由领取。无规矩不成方圆,在享受自由的同时,也请牢记如下几点:\n 认真、负责第一位 翻译任务通常不建议超过两周 翻译规范 翻译包括 Jenkins 官网的本地化,以及 博客 的翻译。翻译完成后,提交 Pull Request 并等待 Review。对于质量较高、或者适合在微信公众号上发布的文章,需要另外提交一个 Pull Request 。\nJenkins 的 简体中文语言插件 也热切地期待你的 Pull Request 。\n分享 你可以在本站或者 Mettup 上分享你在使用 Jenkins 或者相关技术时总结的经验、教训、成果等。\n维护本站点 你可以从了解本站的架构开始。小到错别字修正,大到站点风格、架构完善都需要你的参与。\n"
"content": " 参与开源社区真的不只有 Coding 一条路可选。只要你认同“开源”,有热情,就可以!任何岗位、校大学生、甚至\u0026rdquo;不懂\u0026rdquo;技术都能够加入我们。走过路过的朋友们别错过,下面的参与方式总有一种能把你带上开源事业的“不归路”,如果真的没有包含你希望的参与方式,也可以从现在就发起一个 Pull Request 开始:\nJenkins 本地化 Jenkins 中文官网 有很多的 翻译任务 需要各路英雄自由领取。无规矩不成方圆,在享受自由的同时,也请牢记如下几点:\n 认真、负责第一位 翻译任务通常不建议超过两周 翻译规范 翻译包括 Jenkins 官网的本地化,以及 博客 的翻译。翻译完成后,提交 Pull Request 并等待 Review。对于质量较高、或者适合在微信公众号上发布的文章,需要另外提交一个 Pull Request 。\nJenkins 的 简体中文语言插件 也热切地期待你的 Pull Request 。\n新手 Bug 如果你之前没有参与过 Jenkins 的贡献或者对如何开始不太情况,可以查看 新手 Bug 。这是一些相对比较简单,容易修改的问题。\n分享 你可以在本站或者 Mettup 上分享你在使用 Jenkins 或者相关技术时总结的经验、教训、成果等。\n维护本站点 你可以从了解本站的架构开始。小到错别字修正,大到站点风格、架构完善都需要你的参与。\n"
},
{
"uri": "https://jenkins-zh.github.io/about/channels/",
......@@ -174,6 +174,13 @@
"description": "",
"content": ""
},
{
"uri": "https://jenkins-zh.github.io/tags/pipeline/",
"title": "Pipeline",
"tags": [],
"description": "",
"content": ""
},
{
"uri": "https://jenkins-zh.github.io/tags/remoting/",
"title": "Remoting",
......@@ -237,6 +244,13 @@
"description": "从 Jenkins Master 扩展网络连接",
"content": "Oleg Nenashev 和我今年将在旧金山的 DevOps World | Jenkins World 上,做从 Jenkins Master 扩展网络连接 的演讲。 多年来,我们一直致力于分析、优化和加强 Remoting channel, 才有了现如今 master 能够协调 agent 的活动,并且接收构建的结果。 尽管许多技术可以改进服务,比如优化代理启动器,但是想要有质的改变,只有从根本上改变传播的内容和方式。\n3月,JENKINS-27035 引入了一个框架,用于检查 Remoting channel 在高级别上的通信。 以前,开发人员只能使用一般的低级工具,例如 Wireshark, 它不能精确的识别 Jenkins 负责通信的代码片段。\n在过去的几个月里,Cloud Native SIG 在解决根本原因方面取得了进展。 Artifact Manager on S3 plugin 已经发布并与 Jenkins Evergreen 整合, 支持在 agent 和 Amazon 服务器之间,进行大制品的上传和下载, 源生插件允许由 agent 生成的所有构建的日志内容(例如在 steps 的 sh 中) 直接定向流到外部存储服务,如 AWS CloudWatch Logs。 与此同时也开始上传 junit 格式的测试结果,这些测试结果有时会变的很大,将直接从 agent 到存储数据库。 所有这些努力都可以减轻 Jenkins Master 和本地网络的负载,而不需要开发人员修改他们的 pipeline 脚本。\n其他方法也在酝酿之中。 虽然“一次性”的 agent 在新的 vm 或容器中运行,可以极大地提高可重复性, 但是每一次构建都需要传输兆字节的 Java 代码,所以 Jenkins 的特征是需要对它们建立预缓存。 使用 Apache Kafka 的工作正在进行中,以使得通道在网络故障时更加健壮。 最引人注目的是,这个提议 Cloud Native Jenkins MVP 将消除单个 Jenkins Master 服务处理数百个构建的瓶颈。\n"
},
{
"uri": "https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/",
"title": "使用 YAML 文件配置 Jenkins 流水线",
"tags": ["pipeline"],
"description": "这也是一种自定义流水线 DSL 的方法",
"content": " 几年前,我们的 CTO 写了一篇关于 使用 Jenkins 和 Docker 为 Ruby On Rails 应用提供持续集成服务 的文章。这些年,我们一直使用这个 CI 流水线解决方案,直到我们最近决定做一次升级。为什么呢?\n Jenkins 的版本过低,已经很难升级 Wolox 过去几年增长显著,一直面临着如何伸缩的问题 只有极少数人如何修复 Jenkins 服务的问题 配置 Jenkins 任务不是一件简单的任务,使我们的项目启动过程变慢 更改每个作业运行的命令也不是一件简单的任务,并且有权限更改的人并不多。 Wolox 拥有广泛的项目,语言种类繁多,使得这个问题尤为突显。 考虑到这些问题,我们开始深入研究最新版的 Jenkins,看看如何提升我们的 CI 服务。我们需要构建一个新的CI服务,至少要解决以下问题:\n 支持 Docker 构建。我们的项目依赖的一个或多个 Docker 镜像的执行(应用,数据库,Redis 等) 如有必要,易于配置和复制 易于增加新项目 易于修改构建步骤。工作在项目上的所有人都应该能修改它,如果他们希望执行 npm install 或 yarn install 安装Jenkins和Docker 安装 Jenkins 非常简单,直接从 官方教程 选择一种方式安装。\n以下是我们在 AWS 上的安装步骤:\nsudo rpm — import https://pkg.jenkins.io/debian/jenkins.io.key sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat/jenkins.repo sudo yum install java-1.8.0 -y sudo yum remove java-1.7.0-openjdk -y sudo yum install jenkins -y sudo yum update -y sudo yum install -y docker 从 GitHub 上自动添加项目 从 Github 上自动添加项目可以通过 GitHub Branch Source 插件实现。它能将 GitHub 的组织中符合规则的项目自动添加到 Jenkins 中。唯一的约束就是在每一个分支下都必须有一个 Jenkinsfile,用于描述如何构建项目。\n易于修改的配置 我们之前使用 Jenkins 最痛苦的是修改项目的构建步骤。在 Jenkins 任务中,你会看到像以下代码(用于构建):\n#!/bin/bash +x set -e # Remove unnecessary files echo -e \u0026quot;\\033[34mRemoving unnecessary files...\\033[0m\u0026quot; rm -f log/*.log \u0026amp;\u0026gt; /dev/null || true \u0026amp;\u0026gt; /dev/null rm -rf public/uploads/* \u0026amp;\u0026gt; /dev/null || true \u0026amp;\u0026gt; /dev/null # Build Project echo -e \u0026quot;\\033[34mBuilding Project...\\033[0m\u0026quot; docker-compose --project-name=${JOB_NAME} build # Prepare test database COMMAND=\u0026quot;bundle exec rake db:drop db:create db:migrate\u0026quot; echo -e \u0026quot;\\033[34mRunning: $COMMAND\\033[0m\u0026quot; docker-compose --project-name=${JOB_NAME} run \\ -e RAILS_ENV=test web $COMMAND # Run tests COMMAND=\u0026quot;bundle exec rspec spec\u0026quot; echo -e \u0026quot;\\033[34mRunning: $COMMAND\\033[0m\u0026quot; unbuffer docker-compose --project-name=${JOB_NAME} run web $COMMAND # Run rubocop lint COMMAND=\u0026quot;bundle exec rubocop app spec -R --format simple\u0026quot; echo -e \u0026quot;\\033[34mRunning: $COMMAND\\033[0m\u0026quot; unbuffer docker-compose --project-name=${JOB_NAME} run -e RUBYOPT=\u0026quot;-Ku\u0026quot; web $COMMAND 在构建步骤后,执行 Docker 构建的清理工作:\n#!/bin/bash +x docker-compose --project-name=${JOB_NAME} stop \u0026amp;\u0026gt; /dev/null || true \u0026amp;\u0026gt; /dev/null docker-compose --project-name=${JOB_NAME} rm --force \u0026amp;\u0026gt; /dev/null || true \u0026amp;\u0026gt; /dev/null docker stop `docker ps -a -q -f status=exited` \u0026amp;\u0026gt; /dev/null || true \u0026amp;\u0026gt; /dev/null docker rm -v `docker ps -a -q -f status=exited` \u0026amp;\u0026gt; /dev/null || true \u0026amp;\u0026gt; /dev/null docker rmi `docker images --filter 'dangling=true' -q --no-trunc` \u0026amp;\u0026gt; /dev/null || true \u0026amp;\u0026gt; /dev/null 尽管这些命令并不复杂,但是更改其中的任何命令都需要具有权限的人员来操作相应的 Jenkins 任务,并清楚知道自己需要做什么。\nJenkinsfile的成与败 使用当前的 Jenkins 版本,我们可以利用 Jenkins pipeline 对我们的构建流进行建模,并保存到一个文件中。 该文件会被签入代码库。因此,任何有权访问它的人都可以修改其中的步骤。棒极了。\nJenkins 流水线还支持:\n Docker 及多个镜像可用于构建 使用 withEnv 设置环境变量,还支持很多其它内建的 函数 这为 Wolox 提供了完美的用例。我们可以将构建配置写入到一个被检入到代码库的文件中,并且允许任务有权限访问的人修改。但是,一个简单的 Rails 项目的 Jenkinsfile 看起来却像这样:\n# sample Jenkinsfile. Might not compile node { checkout scm withEnv(['MYTOOL_HOME=/usr/local/mytool']) { docker.image(\u0026quot;postgres:9.2\u0026quot;).withRun() { db -\u0026gt; withEnv(['DB_USERNAME=postgres', 'DB_PASSWORD=', \u0026quot;DB_HOST=db\u0026quot;, \u0026quot;DB_PORT=5432\u0026quot;]) { docker.image(\u0026quot;redis:X\u0026quot;).withRun() { redis -\u0026gt; withEnv([\u0026quot;REDIS_URL=redis://redis\u0026quot;]) { docker.build(imageName, \u0026quot;--file .woloxci/Dockerfile .\u0026quot;).inside(\u0026quot;--link ${db.id}:postgres --link ${redis.id}:redis\u0026quot;) { sh \u0026quot;rake db:create\u0026quot; sh \u0026quot;rake db:migrate\u0026quot; sh \u0026quot;bundle exec rspec spec\u0026quot; } } } } } } } 这样的文件不仅难以理解,还难以修改。这样的构建逻辑非常容易被破坏,如果你不熟悉 Groovy。如果你对 Jenkins 流水线是如何工作的一无所知,就更容易了。这样,修改或增加一个新的 Docker 镜像就变得不简单,也容易导致混淆。\n通过 YAML 配置 Jenkins 流水线 就个人而言,我总是期望为 CI 配置简单的配置文件。这次我们有机会构建使用 YAML 文件配置的 CI。经过分析,我们总结出以下这样的 YAML,它已经能满足我们的需求:\nconfig: dockerfile: .woloxci/Dockerfile project_name: some-project-name services: - postgresql - redis steps: analysis: - bundle exec rubocop -R app spec --format simple - bundle exec rubycritic --path ./analysis --minimum-score 80 --no-browser setup_db: - bundle exec rails db:create - bundle exec rails db:schema:load test: - bundle exec rspec security: - bundle exec brakeman --exit-on-error audit: - bundle audit check --update environment: RAILS_ENV: test GIT_COMMITTER_NAME: a GIT_COMMITTER_EMAIL: b LANG: C.UTF-8 它描述了项目基本的配置、构建过程中需要的环境变量、依赖的服务、还有构建步骤。\nJenkinsfile + Shared Libraries = WoloxCI 经过调研 Jenkins 和流水线之后,我们发现可以通过扩展共享库(shared libraries)来实现。共享库是用 Groovy 编写的,可以导入到流水线中,并在必要时执行。\n如果你细心观察以下 Jenkinsfile,你会看到代码是一个接收闭包的方法调用链,我们执行另一个方法将一个新的闭包传递给它。\n# sample Jenkinsfile. Might not compile node { checkout scm withEnv(['MYTOOL_HOME=/usr/local/mytool']) { docker.image(\u0026quot;postgres:9.2\u0026quot;).withRun() { db -\u0026gt; withEnv(['DB_USERNAME=postgres', 'DB_PASSWORD=', \u0026quot;DB_HOST=db\u0026quot;, \u0026quot;DB_PORT=5432\u0026quot;]) { docker.image(\u0026quot;redis:X\u0026quot;).withRun() { redis -\u0026gt; withEnv([\u0026quot;REDIS_URL=redis://redis\u0026quot;]) { docker.build(imageName, \u0026quot;--file .woloxci/Dockerfile .\u0026quot;).inside(\u0026quot;--link ${db.id}:postgres --link ${redis.id}:redis\u0026quot;) { sh \u0026quot;rake db:create\u0026quot; sh \u0026quot;rake db:migrate\u0026quot; sh \u0026quot;bundle exec rspec spec\u0026quot; } } } } } } } Groovy 语言足够灵活,能在在运行时创建声明式代码,这使我们能使用 YAML 来配置我们的流水线!\nWolox-CI介绍 wolox-ci 诞生于 Jenkins 的共享库。以下是关于 Wolox-CI 的具体使用方式。\n使用 wolox-ci,Jenkinsfile 被精简成:\n@Library('wolox-ci') _ node { checkout scm woloxCi('.woloxci/config.yml'); } 它会检出代码,然后调用 wolox-ci。共享库代码会读取到 YAML 文件,如下:\nconfig: dockerfile: .woloxci/Dockerfile project_name: some-project-name services: - postgresql - redis steps: analysis: - bundle exec rubocop -R app spec –format simple - bundle exec rubycritic –path ./analysis –minimum-score 80 –no-browser setup_db: - bundle exec rails db:create - bundle exec rails db:schema:load test: - bundle exec rspec security: - bundle exec brakeman –exit-on-error audit: - bundle audit check –update environment: RAILS_ENV: test GIT_COMMITTER_NAME: a GIT_COMMITTER_EMAIL: b LANG: C.UTF-8 然后,Jenkins 就会执行你的构建任务。\n共享库有一个好处是我们可以集中扩展和修改我们的共享库代码。一旦添加新代码,Jenkins 就会自动更新它,还会通知所有的任务。\n由于我们有不同语言的项目,我们使用 Docker 来构建测试环境。WoloxCI 假设有一个 Dockerfile 要构建,并将在容器内运行所有指定的命令。\nconfig.yml 各部分介绍 config部分 这是 config.yml 的第一部分,用于指定基本配置,包括项目的名称,Dockerfile 的路径。Dockerfile 用于构建镜像,所有的命令都运行在该镜像的容器中。\nServices 部分 这部分定义了哪些服务被暴露到容器中。WoloxCI 支持以下开箱即用的服务:postgresql、mssql 和 redis。你还可以指定 Docker 镜像的版本。\n增加一个新的服务类型也不难。你只需要在该目录下(https://github.com/Wolox/wolox-ci/tree/development/vars)添加,然后告诉共享库该服务是如何被转换的,如https://github.com/Wolox/wolox-ci/blob/development/src/com/wolox/parser/ConfigParser.groovy#L76\nSteps 部分 在此部分列出的命令,都会被运行在 Docker 容器中。你可以在 Jenkins 界面上看到每一步的执行结果。\nEnvironment 部分 如果构建过程需要一些环境变量,你可以在这部分指定它们。Steps 部分中描述的步骤执行过程中,Docker 容器会提供你设置好的所有环境变量。\n总结 目前,WoloxCI 还在我们所有项目中一小部分项目进行测试。这让有权限访问它的人通过 YAML 文件更改构建步骤。这是对我们 CI 工作流程来说是一个重大改进。\nDocker 使我们轻松更换编程语言,而不用对 Jenkins 安装做任何的更改。并且,当检查到 GitHub 组织中的新项目(项目中有 Jenkinsfile)时,Jenkins GitHub Branch Source 插件会自动添加新的 Jenkins 项目。\n所有这些改进节约了我们维护 Jenkins 的大量时间,并使我们可以轻松扩展而无需任何额外配置。\n译者小结 本文最大的亮点是它介绍了一种实现自定义构建语言的方式。通过 Jenkins 的共享库技术,将构建逻辑从 Jenkinsfile 中移到了 YAML 文件中。同样的,我们可以将构建逻辑移动 JSON 文件中,或者任何格式的文件中,只你的共享库能解析它,并将它转换成 Jenkins 能理解的格式。\n"
},
{
"uri": "https://jenkins-zh.github.io/about/about-site/",
"title": "关于本站",
......
......@@ -34,6 +34,7 @@ GitHub 请您使用同一个 GitHub 账号来与大家交流,不欢迎使用
Jenkins 本地化 Jenkins 中文官网 有很多的 翻译任务 需要各路英雄自由领取。无规矩不成方圆,在享受自由的同时,也请牢记如下几点:
认真、负责第一位 翻译任务通常不建议超过两周 翻译规范 翻译包括 Jenkins 官网的本地化,以及 博客 的翻译。翻译完成后,提交 Pull Request 并等待 Review。对于质量较高、或者适合在微信公众号上发布的文章,需要另外提交一个 Pull Request 。
Jenkins 的 简体中文语言插件 也热切地期待你的 Pull Request 。
新手 Bug 如果你之前没有参与过 Jenkins 的贡献或者对如何开始不太情况,可以查看 新手 Bug 。这是一些相对比较简单,容易修改的问题。
分享 你可以在本站或者 Mettup 上分享你在使用 Jenkins 或者相关技术时总结的经验、教训、成果等。
维护本站点 你可以从了解本站的架构开始。小到错别字修正,大到站点风格、架构完善都需要你的参与。</description>
</item>
......@@ -167,6 +168,19 @@ Jenkins 社区贡献者们秉承传播 Jenkins 技术、加强互动交流、推
在过去的几个月里,Cloud Native SIG 在解决根本原因方面取得了进展。 Artifact Manager on S3 plugin 已经发布并与 Jenkins Evergreen 整合, 支持在 agent 和 Amazon 服务器之间,进行大制品的上传和下载, 源生插件允许由 agent 生成的所有构建的日志内容(例如在 steps 的 sh 中) 直接定向流到外部存储服务,如 AWS CloudWatch Logs。 与此同时也开始上传 junit 格式的测试结果,这些测试结果有时会变的很大,将直接从 agent 到存储数据库。 所有这些努力都可以减轻 Jenkins Master 和本地网络的负载,而不需要开发人员修改他们的 pipeline 脚本。</description>
</item>
<item>
<title>使用 YAML 文件配置 Jenkins 流水线</title>
<link>https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/</guid>
<description>几年前,我们的 CTO 写了一篇关于 使用 Jenkins 和 Docker 为 Ruby On Rails 应用提供持续集成服务 的文章。这些年,我们一直使用这个 CI 流水线解决方案,直到我们最近决定做一次升级。为什么呢?
Jenkins 的版本过低,已经很难升级 Wolox 过去几年增长显著,一直面临着如何伸缩的问题 只有极少数人如何修复 Jenkins 服务的问题 配置 Jenkins 任务不是一件简单的任务,使我们的项目启动过程变慢 更改每个作业运行的命令也不是一件简单的任务,并且有权限更改的人并不多。 Wolox 拥有广泛的项目,语言种类繁多,使得这个问题尤为突显。 考虑到这些问题,我们开始深入研究最新版的 Jenkins,看看如何提升我们的 CI 服务。我们需要构建一个新的CI服务,至少要解决以下问题:
支持 Docker 构建。我们的项目依赖的一个或多个 Docker 镜像的执行(应用,数据库,Redis 等) 如有必要,易于配置和复制 易于增加新项目 易于修改构建步骤。工作在项目上的所有人都应该能修改它,如果他们希望执行 npm install 或 yarn install 安装Jenkins和Docker 安装 Jenkins 非常简单,直接从 官方教程 选择一种方式安装。
以下是我们在 AWS 上的安装步骤:
sudo rpm — import https://pkg.jenkins.io/debian/jenkins.io.key sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat/jenkins.repo sudo yum install java-1.</description>
</item>
<item>
<title>关于本站</title>
<link>https://jenkins-zh.github.io/about/about-site/</link>
......
......@@ -119,6 +119,11 @@
<priority>0</priority>
</url>
<url>
<loc>https://jenkins-zh.github.io/tags/pipeline/</loc>
<priority>0</priority>
</url>
<url>
<loc>https://jenkins-zh.github.io/tags/remoting/</loc>
<priority>0</priority>
......@@ -163,6 +168,10 @@
<loc>https://jenkins-zh.github.io/wechat/articles/2018-12-19-scaling-network-connections/</loc>
</url>
<url>
<loc>https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/</loc>
</url>
<url>
<loc>https://jenkins-zh.github.io/about/about-site/</loc>
</url>
......
......@@ -360,6 +360,22 @@
</div>
<div class="break-inside-avoid-l nested-copy-line-height mb5">
<h2 class="f3">
<a href="/tags/pipeline" class="link black hover-blue">
pipeline <span class="f6 gray"> &#8599;</span>
</a>
</h2>
<h3>
<a href="https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/" class="link blue">
使用 YAML 文件配置 Jenkins 流水线
</a>
</h3>
</div>
<div class="break-inside-avoid-l nested-copy-line-height mb5">
<h2 class="f3">
<a href="/tags/remoting" class="link black hover-blue">
......
......@@ -109,6 +109,15 @@
<description></description>
</item>
<item>
<title>Pipeline</title>
<link>https://jenkins-zh.github.io/tags/pipeline/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jenkins-zh.github.io/tags/pipeline/</guid>
<description></description>
</item>
<item>
<title>Remoting</title>
<link>https://jenkins-zh.github.io/tags/remoting/</link>
......
<!DOCTYPE html>
<html class="no-js" lang="zh-CN">
<head>
<meta charset="utf-8">
<link rel="preload" href="https://jenkins-zh.github.io/files/muli-latin-200.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="https://jenkins-zh.github.io/files/muli-latin-400.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="https://jenkins-zh.github.io/files/muli-latin-800.woff2" as="font" type="font/woff2" crossorigin>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Pipeline | Jenkins 中文社区</title>
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="generator" content="Hugo 0.52" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="alternate" type="application/rss&#43;xml" href="https://jenkins-zh.github.io/tags/pipeline/index.xml">
<link href='/dist/main.css' rel='stylesheet' type="text/css" /><script src="/js/chart.js"></script>
<style>
img.avatar {
width: 32px;
display: inline;
}
</style>
<meta property="og:title" content="Pipeline" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://jenkins-zh.github.io/tags/pipeline/" />
<meta itemprop="name" content="Pipeline">
<meta itemprop="description" content="">
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Pipeline"/>
<meta name="twitter:description" content=""/>
</head>
<body class="ma0 sans-serif bg-primary-color-light">
<nav class="bg-primary-color-dark pv4 w-100" role="navigation">
<div class="center flex-ns flex-wrap items-center justify-start mw9">
<h1 class="dim f3 lh-solid ml0-ns mr0 mr4-l mv0 pl3 pl4-ns">
<a href="https://jenkins-zh.github.io/" class="link white">
Jenkins 中文社区
</a>
</h1>
<ul class="list ma0 pa0 dn dib-l">
<li class="f5 dib mr4" role="menuitem">
<a href="/wechat/" class="dim link light-silver"
>
微信
</a>
</li>
<li class="f5 dib mr4" role="menuitem">
<a href="/about/" class="dim link light-silver"
>
关于我们
</a>
</li>
<li class="f5 dib mr4" role="menuitem">
<a href="http://jenkins.io/zh" class="dim link light-silver"
target="_blank">
Jenkins 官网
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32" class="fill-current v-base" aria-label="External Link">
<path d="M25.152 16.576v5.696q0 2.144-1.504 3.648t-3.648 1.504h-14.848q-2.144 0-3.648-1.504t-1.504-3.648v-14.848q0-2.112 1.504-3.616t3.648-1.536h12.576q0.224 0 0.384 0.16t0.16 0.416v1.152q0 0.256-0.16 0.416t-0.384 0.16h-12.576q-1.184 0-2.016 0.832t-0.864 2.016v14.848q0 1.184 0.864 2.016t2.016 0.864h14.848q1.184 0 2.016-0.864t0.832-2.016v-5.696q0-0.256 0.16-0.416t0.416-0.16h1.152q0.256 0 0.416 0.16t0.16 0.416zM32 1.152v9.12q0 0.48-0.352 0.8t-0.8 0.352-0.8-0.352l-3.136-3.136-11.648 11.648q-0.16 0.192-0.416 0.192t-0.384-0.192l-2.048-2.048q-0.192-0.16-0.192-0.384t0.192-0.416l11.648-11.648-3.136-3.136q-0.352-0.352-0.352-0.8t0.352-0.8 0.8-0.352h9.12q0.48 0 0.8 0.352t0.352 0.8z"></path>
</svg>
</a>
</li>
</ul>
<div class="db dib-ns pl3"><form id="site-search-form" action="" role="search">
<fieldset class="bn ma0 pa0">
<label class="clip" for="email-address">Search</label>
<input type="search" id="search-input" class="needs-js bg-left bg-transparent bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white"
placeholder="搜索文档" type="text"
name="email-address" value="" style="background-image:url('/images/icon-search.png');background-size:16px 16px;">
</fieldset>
</form>
</div>
<div class="list ma0 pa0 dn dib-l"></div>
<span class="absolute mt1 mt2-l pr3 right-0 top-0">
<a class="github-button needs-js link primary-color-dark" href="https://github.com/LinuxSuRen/jenkins-chat/" data-size="large" data-show-count="false" aria-label="Star Jenkins WeChat GitHub">Star</a>
</span>
</div>
</nav>
<main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns">
<div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns">
<div class="flex">
<div class="dn db-l w-20">
<nav role="navigation">
<ul class="list pa0 nl2">
</ul>
</nav>
</div>
<div class="w-100 w-80-l ph0 ph4-l">
<article class="w-100 nested-copy-line-height nested-links nested-img">
<h1 class="primary-color-dark f2">
Tag: Pipeline
</h1>
<div class=" mid-gray f5 f4-l">
</div>
</article>
<div class="flex flex-wrap">
<section class="flex-ns flex-wrap justify-between w-100">
<div class="relative weight-0">
<div class="bg-white mb2 pa3 pa4-l gray">
<h1 class="near-black f3">
<a href="/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/" class="link primary-color dim">使用 YAML 文件配置 Jenkins 流水线</a>
</h1>
<div class="lh-copy links">
这也是一种自定义流水线 DSL 的方法
<a href="/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/" class="f6 mt2 db link primary-color dim">
查看更多 &raquo;
</a>
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</main>
<footer class="bg-primary-color-dark ph4-ns pt4 relative w-100" role="contentinfo">
<div class="center flex-ns flex-wrap justify-between mw9 w-90">
<div class="pb3 pt4 w-100 w-50-ns">
<div class="b f3 light-gray mb3 nested-links tc">
<a href="https://github.com/LinuxSuRen/jenkins-chat/graphs/contributors" target="_blank" class="link">Jenkins 社区贡献者</a> 维护<br/>
</div>
<ul class="center f6 list ma0 mv3 pa0 tc" style="display:none"><li class="dib mr3"><a href="https://github.com/LinuxSuRen/jenkins-chat/issues/new" class="dim link light-gray pv2">File an Issue</a></li></ul>
<ul class="center f6 list ma0 mv4 pa0 tc">
<li class="dib mr3">
<a href="https://twitter.com/suren69811254" target="_blank" class="dim link light-gray pv2">@suren69811254</a>
</li>
<li class="dib mr3">
<a href="https://www.youtube.com/channel/UC63xz3pq26BBgwB3cnwCoqQ" target="_blank" class="dim link light-gray pv2">YouTube</a>
</li>
</ul>
</div>
<div>
<a href="https://mp.weixin.qq.com/s/vifdduC3kRGSIMpyL03yVA" target="_blank">
<img src="https://jenkins.io/images/jenkins-wechat.png" with="100" height="100">
</a>
</div>
</div>
<div class="f7 gray mb5 mb0-ns ph3 w-100" style="display:none"> 
<p class="dib mr4">Jenkins&reg; is a registered trademark of <a href="https://www.spi-inc.org/" class="link">Software in the Public Interest, Inc.</a></p>
<p class="dib">Copyright 2018–2019 the original authors.</p>
</div>
<div class="bg-primary-color-dark bottom-0 left-0 right-0 dn-l fixed pb3 ph3 w-100"><div class="globalmenu mobilemenu pb3 dn">
<ul class="list hidden dib ph0 ma0 scrolling-touch tc">
<li class="tl dib ma0 hover-bg-black w-100">
<a href="/wechat/" class="ttu f6 link primary-color-light overflow hover-white db brand-font ma0 w-100 pv3 ph4">
微信
</a>
</li>
<li class="tl dib ma0 hover-bg-black w-100">
<a href="/about/" class="ttu f6 link primary-color-light overflow hover-white db brand-font ma0 w-100 pv3 ph4">
关于我们
</a>
</li>
<li class="tl dib ma0 hover-bg-black w-100">
<a href="http://jenkins.io/zh" class="ttu f6 link primary-color-light overflow hover-white db brand-font ma0 w-100 pv3 ph4">
Jenkins 官网
</a>
</li>
</ul>
</div>
<div class="docsmenu mobilemenu pb3 dn">
<ul class="list dib ph0 ma0 scrolling-touch tc">
</ul>
</div>
<div class="flex dn-l justify-between">
<button class="js-toggle flex-auto dib dn-l f6 tc db mt4-ns ph3 pv2 link mr2 white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".globalmenu">Menu</button>
<button class="js-toggle flex-auto dib dn-l f6 tc db mt4-ns ph3 pv2 link white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".docsmenu">Docs Menu</button>
</div>
</div>
</footer>
<link href="/dist/auto-complete.css" rel="stylesheet">
<script type="text/javascript">
var baseurl = "https:\/\/jenkins-zh.github.io\/";
</script>
<script src="/dist/lunr.js"></script>
<script src="/dist/autocomplete.js"></script>
<script src="/dist/jquery-3.2.1.min.js"></script>
<script src="/dist/search.js"></script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Pipeline on Jenkins 中文社区</title>
<link>https://jenkins-zh.github.io/tags/pipeline/</link>
<description>Recent content in Pipeline on Jenkins 中文社区</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh-CN</language>
<atom:link href="https://jenkins-zh.github.io/tags/pipeline/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>使用 YAML 文件配置 Jenkins 流水线</title>
<link>https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/</guid>
<description>几年前,我们的 CTO 写了一篇关于 使用 Jenkins 和 Docker 为 Ruby On Rails 应用提供持续集成服务 的文章。这些年,我们一直使用这个 CI 流水线解决方案,直到我们最近决定做一次升级。为什么呢?
Jenkins 的版本过低,已经很难升级 Wolox 过去几年增长显著,一直面临着如何伸缩的问题 只有极少数人如何修复 Jenkins 服务的问题 配置 Jenkins 任务不是一件简单的任务,使我们的项目启动过程变慢 更改每个作业运行的命令也不是一件简单的任务,并且有权限更改的人并不多。 Wolox 拥有广泛的项目,语言种类繁多,使得这个问题尤为突显。 考虑到这些问题,我们开始深入研究最新版的 Jenkins,看看如何提升我们的 CI 服务。我们需要构建一个新的CI服务,至少要解决以下问题:
支持 Docker 构建。我们的项目依赖的一个或多个 Docker 镜像的执行(应用,数据库,Redis 等) 如有必要,易于配置和复制 易于增加新项目 易于修改构建步骤。工作在项目上的所有人都应该能修改它,如果他们希望执行 npm install 或 yarn install 安装Jenkins和Docker 安装 Jenkins 非常简单,直接从 官方教程 选择一种方式安装。
以下是我们在 AWS 上的安装步骤:
sudo rpm — import https://pkg.jenkins.io/debian/jenkins.io.key sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat/jenkins.repo sudo yum install java-1.</description>
</item>
</channel>
</rss>
\ No newline at end of file
......@@ -179,7 +179,7 @@
<a href="https://jenkins-zh.github.io/wechat/articles/2018-12-25-year-in-review/" class="dib f6 pr1 hover-bg-light-gray br-100" title="回顾 2018: 革新的一年">
<a href="https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/" class="dib f6 pr1 hover-bg-light-gray br-100" title="使用 YAML 文件配置 Jenkins 流水线">
<svg class="fill-current" height="30px" viewBox="0 0 24 24" width="30px" xmlns="http://www.w3.org/2000/svg">
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
<path d="M0 0h24v24H0z" fill="none"/>
......
......@@ -173,7 +173,7 @@
</a>
<a href="https://jenkins-zh.github.io/wechat/articles/2018-12-19-scaling-network-connections/" class="dib f6 pl1 hover-bg-light-gray br-100" title="从 Jenkins Master 扩展网络连接 ">
<a href="https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/" class="dib f6 pl1 hover-bg-light-gray br-100" title="使用 YAML 文件配置 Jenkins 流水线 ">
<svg class="fill-current" height="30px" viewBox="0 0 24 24" width="30px" xmlns="http://www.w3.org/2000/svg">
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
<path d="M0 0h24v24H0z" fill="none"/>
......
......@@ -357,15 +357,15 @@
<h1 class="near-black f3">
<a href="/wechat/articles/2018-12-25-year-in-review/" class="link primary-color dim">回顾 2018: 革新的一年</a>
<a href="/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/" class="link primary-color dim">使用 YAML 文件配置 Jenkins 流水线</a>
</h1>
<div class="lh-copy links">
Jenkins 创始人 KK 先生的年终总结
这也是一种自定义流水线 DSL 的方法
<a href="/wechat/articles/2018-12-25-year-in-review/" class="f6 mt2 db link primary-color dim">
<a href="/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/" class="f6 mt2 db link primary-color dim">
查看更多 &raquo;
</a>
......@@ -382,15 +382,15 @@
<h1 class="near-black f3">
<a href="/wechat/articles/2018-11-21-validate-jenkinsfile/" class="link primary-color dim">在 VS Code 中校验 Jenkinsfile</a>
<a href="/wechat/articles/2018-12-25-year-in-review/" class="link primary-color dim">回顾 2018: 革新的一年</a>
</h1>
<div class="lh-copy links">
VS Code 中的 Jenkinsfile 插件
Jenkins 创始人 KK 先生的年终总结
<a href="/wechat/articles/2018-11-21-validate-jenkinsfile/" class="f6 mt2 db link primary-color dim">
<a href="/wechat/articles/2018-12-25-year-in-review/" class="f6 mt2 db link primary-color dim">
查看更多 &raquo;
</a>
......
......@@ -116,6 +116,19 @@ Jenkins 社区贡献者们秉承传播 Jenkins 技术、加强互动交流、推
在过去的几个月里,Cloud Native SIG 在解决根本原因方面取得了进展。 Artifact Manager on S3 plugin 已经发布并与 Jenkins Evergreen 整合, 支持在 agent 和 Amazon 服务器之间,进行大制品的上传和下载, 源生插件允许由 agent 生成的所有构建的日志内容(例如在 steps 的 sh 中) 直接定向流到外部存储服务,如 AWS CloudWatch Logs。 与此同时也开始上传 junit 格式的测试结果,这些测试结果有时会变的很大,将直接从 agent 到存储数据库。 所有这些努力都可以减轻 Jenkins Master 和本地网络的负载,而不需要开发人员修改他们的 pipeline 脚本。</description>
</item>
<item>
<title>使用 YAML 文件配置 Jenkins 流水线</title>
<link>https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://jenkins-zh.github.io/wechat/articles/2019-01-23-configuring-jenkins-pipeline-with-yaml-file/</guid>
<description>几年前,我们的 CTO 写了一篇关于 使用 Jenkins 和 Docker 为 Ruby On Rails 应用提供持续集成服务 的文章。这些年,我们一直使用这个 CI 流水线解决方案,直到我们最近决定做一次升级。为什么呢?
Jenkins 的版本过低,已经很难升级 Wolox 过去几年增长显著,一直面临着如何伸缩的问题 只有极少数人如何修复 Jenkins 服务的问题 配置 Jenkins 任务不是一件简单的任务,使我们的项目启动过程变慢 更改每个作业运行的命令也不是一件简单的任务,并且有权限更改的人并不多。 Wolox 拥有广泛的项目,语言种类繁多,使得这个问题尤为突显。 考虑到这些问题,我们开始深入研究最新版的 Jenkins,看看如何提升我们的 CI 服务。我们需要构建一个新的CI服务,至少要解决以下问题:
支持 Docker 构建。我们的项目依赖的一个或多个 Docker 镜像的执行(应用,数据库,Redis 等) 如有必要,易于配置和复制 易于增加新项目 易于修改构建步骤。工作在项目上的所有人都应该能修改它,如果他们希望执行 npm install 或 yarn install 安装Jenkins和Docker 安装 Jenkins 非常简单,直接从 官方教程 选择一种方式安装。
以下是我们在 AWS 上的安装步骤:
sudo rpm — import https://pkg.jenkins.io/debian/jenkins.io.key sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat/jenkins.repo sudo yum install java-1.</description>
</item>
<item>
<title>回顾 2018: 革新的一年</title>
<link>https://jenkins-zh.github.io/wechat/articles/2018-12-25-year-in-review/</link>
......
......@@ -156,6 +156,31 @@
<div class="bg-white mb2 pa3 pa4-l gray">
<h1 class="near-black f3">
<a href="/wechat/articles/2018-11-21-validate-jenkinsfile/" class="link primary-color dim">在 VS Code 中校验 Jenkinsfile</a>
</h1>
<div class="lh-copy links">
VS Code 中的 Jenkinsfile 插件
<a href="/wechat/articles/2018-11-21-validate-jenkinsfile/" class="f6 mt2 db link primary-color dim">
查看更多 &raquo;
</a>
</div>
</div>
</div>
<div class="relative weight-0">
<div class="bg-white mb2 pa3 pa4-l gray">
<h1 class="near-black f3">
<a href="/wechat/articles/2019-01-16-webhook-firewalls/" class="link primary-color dim">在安全防火墙内通过 WebHook 触发构建</a>
</h1>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册