index.html 41.3 KB
Newer Older
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1 2 3
<!DOCTYPE html>
<html class="no-js" lang="zh-CN">

4 5 6 7 8 9
<head>
  <meta charset="utf-8">
  
  <link rel="preload" href="https://jenkins-zh.cn/files/muli-latin-200.woff2" as="font" type="font/woff2" crossorigin>
  <link rel="preload" href="https://jenkins-zh.cn/files/muli-latin-400.woff2" as="font" type="font/woff2" crossorigin>
  <link rel="preload" href="https://jenkins-zh.cn/files/muli-latin-800.woff2" as="font" type="font/woff2" crossorigin>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
10

11 12 13 14 15 16 17 18 19 20 21 22 23 24
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  
  <title>关于 Jenkins master 共享 JENKINS_HOME 目录的实验 - Jenkins 中文社区</title>
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  
  <meta name="description" content="你觉得能通过共享 JENKINS_HOME 目录实现 Jenkins master 的高可用吗?">
  
  
  <meta name="keywords" content="Jenkins,Jenkins中文社区,Jenkins官方公众号,持续集成,持续交付,开源社区,DevOps">
  

  <meta name="viewport" content="width=device-width,minimum-scale=1">
  <meta name="generator" content="Hugo 0.53" />
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
25

26 27 28 29 30 31 32 33 34 35 36
  
  <META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
  

  <link href='/dist/main.css' rel='stylesheet' type="text/css" /><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link href="/images/favicon.ico" rel="shortcut icon" type="image/x-icon">
<link rel="icon" type="image/png" href="/images/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/images/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0594cb">
<meta name="theme-color" content="#ffffff"><style>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
37 38 39 40 41 42 43 44
  img.avatar {
    width: 32px;
    display: inline;
  }
</style>
<meta property="og:title" content="关于 Jenkins master 共享 JENKINS_HOME 目录的实验" />
<meta property="og:description" content="你觉得能通过共享 JENKINS_HOME 目录实现 Jenkins master 的高可用吗?" />
<meta property="og:type" content="article" />
45 46 47
<meta property="og:url" content="https://jenkins-zh.cn/wechat/articles/2019/04/2019-04-23-jenkins-master-shared-home/" /><meta property="article:published_time" content="2019-04-23T00:00:00&#43;00:00"/>
<meta property="article:modified_time" content="2019-04-23T00:00:00&#43;00:00"/>

LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
<meta itemprop="name" content="关于 Jenkins master 共享 JENKINS_HOME 目录的实验">
<meta itemprop="description" content="你觉得能通过共享 JENKINS_HOME 目录实现 Jenkins master 的高可用吗?">


<meta itemprop="datePublished" content="2019-04-23T00:00:00&#43;00:00" />
<meta itemprop="dateModified" content="2019-04-23T00:00:00&#43;00:00" />
<meta itemprop="wordCount" content="234">



<meta itemprop="keywords" content="jenkins," />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="关于 Jenkins master 共享 JENKINS_HOME 目录的实验"/>
<meta name="twitter:description" content="你觉得能通过共享 JENKINS_HOME 目录实现 Jenkins master 的高可用吗?"/>

63
  
LinuxSuRen's avatar
LinuxSuRen 已提交
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-4216293-5"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-4216293-5');



var trackOutboundLink = function(id, url) {
  console.log("track:", id, url)
  gtag('event', 'click', {
    'event_category': 'outbound',
    'event_label': id,
    'transport_type': 'beacon',
    'event_callback': function(){document.location = url;}
  });
}

</script>

86 87 88 89 90
  
</head>

<body class="ma0 sans-serif bg-primary-color-light">
  
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
91 92 93 94 95
<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">
96
      <a href="https://jenkins-zh.cn" class="link white">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
97 98 99 100 101 102 103 104 105 106
         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"
            >
LinuxSuRen's avatar
LinuxSuRen 已提交
107
            博客
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
108 109 110 111 112
              
            
          </a>
        </li>
      
LinuxSuRen's avatar
LinuxSuRen 已提交
113 114 115 116 117 118 119 120 121 122 123
        <li class="f5 dib mr4" role="menuitem">
            
            
          <a href="/tutorial/" class="dim link light-silver"
            >
            教程
              
            
          </a>
        </li>
      
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
124 125 126 127 128 129 130 131 132 133 134
        <li class="f5 dib mr4" role="menuitem">
            
            
          <a href="/event/" class="dim link light-silver"
            >
            活动
              
            
          </a>
        </li>
      
LinuxSuRen's avatar
LinuxSuRen 已提交
135 136 137 138 139 140 141 142 143 144 145
        <li class="f5 dib mr4" role="menuitem">
            
            
          <a href="/partner/" class="dim link light-silver"
            >
            合作伙伴
              
            
          </a>
        </li>
      
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
        <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/jenkins-zh/jenkins-zh/" data-size="large" data-show-count="false" aria-label="Star Jenkins WeChat GitHub">Star</a>
</span>

  </div>
</nav>

195 196
  
  <main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
197 198 199 200 201 202 203 204 205 206 207 208 209 210
    
<main>
  <article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns">
    <div class="flex-l">
      

      <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">



  <aside class="mw5 br3 mv3 nested-links">
    
    
      
LinuxSuRen's avatar
LinuxSuRen 已提交
211
        <h3 class="f4 dib author">
LinuxSuRen's avatar
LinuxSuRen 已提交
212 213 214 215 216
            翟志军
        </h3>

      
      
LinuxSuRen's avatar
LinuxSuRen 已提交
217
        <p class="lh-copy measure center mt0 f6 black-60 bio">
LinuxSuRen's avatar
LinuxSuRen 已提交
218 219 220
          《Jenkins 2.x实践指南》作者,购买地址:https://item.jd.com/12512889.html?dist=jd

        </p>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
221
      
LinuxSuRen's avatar
LinuxSuRen 已提交
222
      <a href="https://github.com/zacker330" target="_blank" class="link dim v-mid dib">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
223 224 225 226 227
        <svg version="1.1" fill="gray" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="18" viewBox="0 0 27 32">
<path d="M9.28 21.44q0.064-0.128-0.064-0.256-0.16-0.128-0.256-0.032-0.064 0.128 0.064 0.224 0.16 0.128 0.256 0.064zM8.768 20.704q-0.096-0.128-0.224-0.096-0.096 0.096 0 0.224 0.128 0.16 0.224 0.096t0-0.224zM8.032 19.968q0.032-0.064-0.096-0.128-0.128-0.032-0.128 0.032-0.064 0.096 0.064 0.16 0.16 0.032 0.16-0.064zM8.416 20.384q0.032 0 0.032-0.064t-0.064-0.096q-0.128-0.128-0.192-0.064t0.032 0.192q0.096 0.096 0.192 0.032zM9.952 21.728q0.032-0.128-0.16-0.192-0.16-0.064-0.224 0.064t0.16 0.192q0.16 0.064 0.224-0.064zM10.688 21.792q0-0.16-0.192-0.16t-0.192 0.16 0.192 0.128 0.192-0.128zM11.392 21.664q-0.032-0.128-0.224-0.096t-0.16 0.16q0.032 0.16 0.192 0.096t0.192-0.16zM22.848 16q0-3.776-2.656-6.464t-6.464-2.688-6.464 2.688-2.688 6.464q0 2.976 1.76 5.376t4.48 3.296q0.32 0.064 0.48-0.096t0.16-0.352q0-0.928-0.032-1.696-0.096 0.032-0.256 0.064t-0.64 0.032-0.864-0.096-0.768-0.352-0.544-0.736q-0.416-1.056-1.024-1.312-0.032-0.032-0.064-0.064l-0.16-0.16t-0.096-0.16 0.064-0.128 0.352-0.064q0.096 0 0.256 0.032t0.544 0.288 0.576 0.64q0.288 0.48 0.672 0.736t0.768 0.256 0.704-0.064 0.512-0.16q0.128-0.864 0.608-1.248-0.896-0.096-1.536-0.32t-1.312-0.704-0.992-1.344-0.352-2.144q0-1.408 0.96-2.464-0.448-1.088 0.096-2.4 0.32-0.128 0.96 0.128t1.088 0.512l0.448 0.288q1.056-0.288 2.304-0.288t2.272 0.288q0.192-0.128 0.512-0.32t0.992-0.448 1.024-0.16q0.512 1.312 0.096 2.4 0.928 1.056 0.928 2.464 0 1.024-0.256 1.792t-0.64 1.248-0.928 0.8-1.12 0.448-1.216 0.224q0.608 0.544 0.608 1.696 0 0.704 0 1.6t-0.032 0.896q0 0.224 0.16 0.352t0.48 0.096q2.752-0.928 4.512-3.296t1.728-5.376zM27.424 7.424v17.152q0 2.112-1.504 3.616t-3.648 1.536h-17.12q-2.144 0-3.648-1.536t-1.504-3.616v-17.152q0-2.112 1.504-3.616t3.648-1.536h17.12q2.144 0 3.648 1.536t1.504 3.616z"></path>
</svg>

      </a>
LinuxSuRen's avatar
LinuxSuRen 已提交
228 229

  
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
230 231 232 233 234
  </aside>


<aside class="fixed-lTK mw5-l right-0 f6 bl-l b--moon-gray pv4 pv0-ns ph4-l nested-list-reset nested-links nested-copy-line-height">
	
235
		<p class="b">内容目录</p>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
  	<nav id="TableOfContents">
<ul>
<li>
<ul>
<li>
<ul>
<li><a href="#jenkins-home-介绍">JENKINS_HOME 介绍</a></li>
<li><a href="#实验环境介绍">实验环境介绍</a></li>
<li><a href="#实验1-创建任务">实验1:创建任务</a></li>
<li><a href="#实验2-任务结果可见性">实验2:任务结果可见性</a></li>
<li><a href="#实验3-两-master-同时执行同一任务">实验3:两 master 同时执行同一任务</a></li>
<li><a href="#实验4-编辑任务">实验4:编辑任务</a></li>
<li><a href="#实验5-定时任务的结果是什么">实验5:定时任务的结果是什么?</a></li>
<li><a href="#小结">小结</a></li>
<li><a href="#附录">附录</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
	

	<div date-pref>
		<a href=".." class="dib f6 pl1 hover-bg-light-gray br-100">
			<svg class="fill-current" height="30px" viewBox="0 0 24 24" width="30px" xmlns="http://www.w3.org/2000/svg">
      <path transform="rotate(90 11.704999923706055,12.000000000000002) " d="m15.41,7.41l-1.41,-1.41l-6,6l6,6l1.41,-1.41l-4.58,-4.59l4.58,-4.59z" id="svg_1"/>
    <path d="M0 0h24v24H0z" fill="none"/>
</svg>

		</a>
		
		
267
			<a href="https://jenkins-zh.cn/wechat/articles/2019/04/2019-04-24-progressive-delivery-in-kubernetes-blue-green-and-canary-deployments/" class="dib f6 pl1 hover-bg-light-gray br-100" title="Kubernetes 中的渐进式交付:蓝绿部署和金丝雀部署 ">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
268 269 270 271 272 273 274
				<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"/>
</svg>

			</a>
		
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
275 276

		
277
			<a href="https://jenkins-zh.cn/wechat/articles/2019/04/2019-04-22-jenkins-weekly-2.173/" class="dib f6 pr1 hover-bg-light-gray br-100" title="Jenkins 2.173 发布通知">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
278 279 280 281 282 283 284 285 286 287 288 289 290
			<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"/>
</svg>

			</a>
		
	</div>

</aside>
</div>

      <div class="order-1 w-80-l mw8 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;">
LinuxSuRen's avatar
LinuxSuRen 已提交
291
        <button id="copyMe" onclick="copyMe()" style="display: none">Copy Me</button>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
        <div class="documentation-copy center mw8">
          <div id="readout" class="fixed right-0 bottom-0">
          </div>
          <header class="flex-none w-100">
  
  <h1 class="lh-title mb3 mv0 pt3 primary-color-dark">关于 Jenkins master 共享 JENKINS_HOME 目录的实验</h1>
</header>

<aside class="bt bw1 pt3 mt2 mid-gray b--mid-gray fn w-100">
  
    <div class="f4 fw4 lh-copy">
      你觉得能通过共享 JENKINS_HOME 目录实现 Jenkins master 的高可用吗?
    </div>
  

  
</aside>



<div class="prose" id="prose">



<blockquote>
<p>审校:<a href="https://github.com/donhui">王冬辉</a><a href="https://github.com/LinuxSuRen">linuxsuren</a></p>
</blockquote>

<p>Jenkins master 的高可用是个老大难的问题。和很多人一样,笔者也想过两个 Jenkins master 共享同一个 JENKINS_HOME 的方案。了解 Jenkins 原理的人,都会觉得这个方案不可行。但是真的不可行吗?</p>

<p>由于工作原因,笔者需要亲自验证以上猜想。</p>

<h3 id="jenkins-home-介绍">JENKINS_HOME 介绍</h3>

<p>Jenkins 所有状态数据都存放文件系统的目录中,这个目录被称为 JENKINS_HOME 目录。</p>

<h3 id="实验环境介绍">实验环境介绍</h3>

<p>笔者通过 Docker compose 启动两个独立的 Jenkins master,分别为 jenkins-a 和 jenkins-b。它们共用同一个 JENKINS_HOME 目录。相应的代码仓库的链接放在文章底部。</p>

<p>将代码克隆到本地后,进入仓库,执行 <code>docker-compose up -d</code> 即可启动实验环境。启动完成,在浏览器中输入 <a href="http://localhost:7088">http://localhost:7088</a> 可访问 jenkins-a,jenkins-b 的地址是 <a href="http://localhost:7089">http://localhost:7089</a> 。但是你会发现它们启动后的界面显示是不一样的。</p>

<p>jenkins-b 的界面如下图所示:</p>

LinuxSuRen's avatar
LinuxSuRen 已提交
336
<p><img src="292372-fd4b85d5b9c8bdf6.png" alt="" /></p>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
337 338 339

<p>而 jenkins-a 的界面如下图所示:</p>

LinuxSuRen's avatar
LinuxSuRen 已提交
340
<p><img src="292372-1bfd4e033b6c25c8.png" alt="" /></p>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386

<p>这时,将 jenkins-a 日志中的解锁密码(Unlock password)输入到 jenkins-b 的页面中,会得到报错信息:</p>

<pre><code>ERROR: The password entered is incorrect, please check the file for the correct password
</code></pre>

<p>这时,再次 jenkins-b 日志中的解锁密码(Unlock password)输入到表单中即可进入下一步。接下来就是按照提示一步步完成了。在 jenkins-b 安装步骤的最后一步,我们设置了管理员的用户名密码:admin/admin。然后就算完成任务了。</p>

<p>然后我们再在 jenkins-a 使用 admin/admin 进行登录,登录是报错的:用户密码不正确。</p>

<p>接下来,执行 <code>docker-compose restart jenkins-a</code> 命令重启 jenkins-a。再次使用 admin/admin 就可以登录成功了。</p>

<p>当两个 Jenkins 启动完成后,接下来开始做实验。</p>

<h3 id="实验1-创建任务">实验1:创建任务</h3>

<p>在 jenkins-a 创建任务 x,刷新 jenkins-b 的页面,jenkins-b 上会不会显示出任务 x ?</p>

<p>结果:jenkins-b 不会出现任务 x。重启 jenkins-b 后,任务 x 出现在任务列表中。</p>

<h3 id="实验2-任务结果可见性">实验2:任务结果可见性</h3>

<p>jenkins-a 上任务执行,jenkins-b 上能否看到任务执行结果?</p>

<p>jenkins-a 执行任务 x,并且执行成功。刷新 jenkins-b 看不到任何执行记录。重启 jenkins-b 后,可看到执行记录。</p>

<h3 id="实验3-两-master-同时执行同一任务">实验3:两 master 同时执行同一任务</h3>

<p>分别在两个 Jenkins master 上(几乎)开始同一个任务 x。其中一个任务的 build number 会更新,但是另一个不会。</p>

<p>其中 jenkins-a 任务 x 的 build number 会升到 2,而 jenkins-b 保持的是 1。这时,单独执行 jenkins-b 的任务 x,日志会出现错误:</p>

<pre><code>jenkins-b_1  | WARNING: A new build could not be created in job x
jenkins-b_1  | java.lang.IllegalStateException: JENKINS-23152: /var/jenkins_home/jobs/x/builds/2 already existed; will not overwrite with x #2
</code></pre>

<h3 id="实验4-编辑任务">实验4:编辑任务</h3>

<p>jenkins-a 上设置任务 x 定时执行,刷新 jenkins-b 页面,任务 x 中并没有定时执行的设置。重启 jenkins-b 后,任务 x 更新。</p>

<h3 id="实验5-定时任务的结果是什么">实验5:定时任务的结果是什么?</h3>

<p>如果 jenkins-a 和 jenkins-b 两个任务均为定时任务,而且都生效了。它们运行结果是什么的呢?</p>

<p>看到的现象是,两个任务都会按时执行,但是只有一个任务能将运行结果写入到磁盘中。界面如下图:</p>

LinuxSuRen's avatar
LinuxSuRen 已提交
387
<p><img src="292372-38c7a7f8aade0793.png" alt="" /></p>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
388 389 390

<p>另,从日志中,可以确认 jenkins-a 和 jenkins-b 确实按时执行了。如下图日志中,看出 jenkins-a 定时执行 #6 次构建时报错,因为 jenkins-b 已经执行过 #6 次构建了:</p>

LinuxSuRen's avatar
LinuxSuRen 已提交
391
<p><img src="292372-55e80e61f0d36dfb.png" alt="" /></p>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435

<h3 id="小结">小结</h3>

<p>可以确认的是,当两个 Jenkins 进程共用同一个 JENKINS_HOME 目录时,其中一个 Jenkins 进程更新了 JENKINS_HOME 的内容,另一个是不会实时更新的。所以,同时启动两个 Jenkins master 共用同一个 JENKINS_HOME 的方案是不可行的。我们不能在 jenkins-a 挂了后,直接将流量切到 jenkins-b。因为 jenkins-b 必须重启。</p>

<p>最后结论:多个 Jenkins master 共享同一个 JENKINS_HOME 的方案是无法使用 Jenkins master 的高可用。</p>

<h3 id="附录">附录</h3>

<ul>
<li>Jenkins standby 实验环境:<a href="https://github.com/zacker330/jenkins-standby-experiment">https://github.com/zacker330/jenkins-standby-experiment</a></li>
</ul>

</div>


<aside class="bt bw1 pt3 mt2 mid-gray b--mid-gray fn w-100">

</aside>




<script src="https://utteranc.es/client.js"
        repo="jenkins-zh/jenkins-zh.github.io"
        issue-term="pathname"
        theme="github-light"
        crossorigin="linuxsuren"
        async>
</script>


          

        </div>
      </div>
      

    </div>
  </article>

  <div class="w-100 bg-light-gray">
    <div class="mw7 pa4 center nested-lh-copy lh-copy">
      <h6 class="f4 dark-gray mb2">
436
  <a href="https://jenkins-zh.cn/wechat/articles/2019/04/2019-04-23-jenkins-master-shared-home/" class="hide-child link primary-color">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
437 438 439
  <span class="nl3 child"><svg class="grow" fill="" height="14px" viewBox="0 0 24 24" width="14px" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>
</span>
    “关于 Jenkins master 共享 JENKINS_HOME 目录的实验”
LinuxSuRen's avatar
LinuxSuRen 已提交
440
  </a> 更新于:April 23, 2019
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
441 442 443 444
</h6>

      <a href="https://github.com/jenkins-zh/jenkins-zh/edit/master/content/wechat/articles/2019/04/2019-04-23-jenkins-master-shared-home.md" class="
f6 ph3 pv1 br2 dib  tc ttu mv3 bg-primary-color white hover-bg-green link
445
" target="_blank">完善此页</a>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469

      

  
  
  

  <div class="nested-lh-copy">
    <ul class="list dib nested-links ml0 pl0">
      
        <li class="db mb2 b">
          Tags:
        </li>
        
          <li class="db dib-l mr3">
            <a class="tag" href="/tags/jenkins">
              jenkins
            </a>
          </li>
        
              
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
470
          <li class="db dib-l mb2 mr3">
471 472
            <a href="/wechat/articles/2020/05/2020-05-18-docker-agent-image-renaming/" class="link">
              Jenkins agent Docker 镜像重新命名了,你知道吗?
LinuxSuRen's avatar
LinuxSuRen 已提交
473 474 475
            </a>
          </li>
        
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
476 477 478 479 480 481 482
      
        
          <li class="db b mt4 mb2 mr2">
            Related entries:
          </li>
        
        
483 484 485 486 487 488 489 490 491
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/05/2020-05-12-how-to-backup-and-restore-jenkins/" class="link">
              手把手教会你 Jenkins 备份与恢复
            </a>
          </li>
        
      
        
        
492 493 494 495 496 497 498 499 500
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/05/2020-05-08-how-to-use-the-jenkins-declarative-pipeline/" class="link">
              如何使用 Jenkins 声明式流水线
            </a>
          </li>
        
      
        
        
501 502 503 504 505 506 507 508 509
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/04/2020-04-30-jenkins-kubesphere-partner/" class="link">
              Jenkins 中文社区携手 KubeSphere,共建 DevOps 技术生态
            </a>
          </li>
        
      
        
        
510 511 512 513 514 515 516 517 518
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/04/2020-04-24-jenkins-release/" class="link">
              Jenkins 长期支持版更新
            </a>
          </li>
        
      
        
        
519 520 521 522 523 524 525 526 527
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/04/2020-04-22-scale-your-jenkins-agents-using-kubernetes/" class="link">
              Kubernetes 构造可自由扩展的 Jenkins
            </a>
          </li>
        
      
        
        
528 529 530 531 532 533 534 535 536
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/04/2020-04-20-weekly-release/" class="link">
              Jenkins 每周版更新
            </a>
          </li>
        
      
        
        
537 538 539 540 541 542 543 544 545
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/04/2020-04-08-build-jenkins-as-a-code/" class="link">
              以代码的形式构建 Jenkins
            </a>
          </li>
        
      
        
        
546 547 548 549 550 551 552 553 554
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/03/2020-03-17-jenkins-release/" class="link">
              Jenkins 长期支持版更新
            </a>
          </li>
        
      
        
        
555 556 557 558 559 560 561 562 563
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/02/2020-02-28-t-mobile-and-jenkins-case-study/" class="link">
              T-Mobile 和 Jenkins 案例研究
            </a>
          </li>
        
      
        
        
564 565 566 567 568 569 570 571 572
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/02/2020-02-18-google-summer-of-code-2019-report/" class="link">
              2019 年 Google 编程之夏活动报告
            </a>
          </li>
        
      
        
        
573
          <li class="db dib-l mb2 mr3">
574
            <a href="/wechat/articles/2020/02/2020-02-10-webSocket/" class="link">
575 576 577 578 579 580 581
              WebSocket
            </a>
          </li>
        
      
        
        
582 583 584 585 586 587 588 589 590
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/12/2019-12-31-implement-cicd-for-multibranch-pipeline-in-jenkins/" class="link">
              使用 Jenkins 实现 CI/CD 多分支流水线
            </a>
          </li>
        
      
        
        
591 592 593 594 595 596 597 598 599
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2020/01/2020-01-13-welcome-to-the-matrix/" class="link">
              欢迎使用流水线指令-矩阵
            </a>
          </li>
        
      
        
        
600 601 602 603 604 605 606 607 608
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/12/2019-12-23-generic-webhook-trigger-plugin/" class="link">
              Webhook 通用触发插件
            </a>
          </li>
        
      
        
        
609 610 611 612 613 614 615 616 617
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/12/2019-12-19-full-build-automation-for-java-application-using-docker/" class="link">
              使用 Docker 全自动构建 Java 应用
            </a>
          </li>
        
      
        
        
618 619 620 621 622 623 624 625 626
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/12/2019-12-11-jenkins-health-advisor-by-cloudbees-is-here/" class="link">
              Jenkins 健康检查顾问
            </a>
          </li>
        
      
        
        
627 628 629 630 631 632 633 634 635
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/08/2019-08-05-jenkins-multi-branch-pipeline/" class="link">
              在大型企业里维护多分支流水线
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
636 637 638 639 640 641 642 643 644
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/07/2019-07-31-pipeline-config-history-plugin/" class="link">
              Jenkins 流水线配置历史插件介绍
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
645
          <li class="db dib-l mb2 mr3">
646 647
            <a href="/wechat/articles/2019/07/2019-07-18-jenkins-weekly-release/" class="link">
              Jenkins 每周版更新
LinuxSuRen's avatar
LinuxSuRen 已提交
648 649 650 651 652 653
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
654
          <li class="db dib-l mb2 mr3">
655 656
            <a href="/wechat/articles/2019/07/2019-07-14-jenkins-pipeline-workshop/" class="link">
              持续交付落地实践工作坊
LinuxSuRen's avatar
LinuxSuRen 已提交
657 658 659 660 661 662
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
663 664 665 666 667 668 669 670 671
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/07/2019-07-09-jenkins-release/" class="link">
              Jenkins 长期支持版更新
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
672 673 674 675 676 677 678 679 680
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/06/2019-06-26-using-active-choices-plugin-merge-jobs/" class="link">
              使用Active-Choices-Plugin插件将十个Job合成一个
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
681 682 683 684 685 686 687 688 689
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/06/2019-06-14-setup-jenkins-ci-in-30-minutes/" class="link">
              30分钟搞定 Jenkins CI
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
690 691 692 693 694 695 696 697 698
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/06/2019-06-10-jenkins-pipeline-workshop/" class="link">
              还在苦恼不会写 Jenkins 流水线?来场工作坊!
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
699 700 701 702 703 704 705 706 707
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-29-jenkins-release/" class="link">
              Jenkins 2.176~2.178版本更新
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
708 709 710 711 712 713 714 715 716
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-28-jenkins-pipeline-shared-lib-unit-test/" class="link">
              如何对 Jenkins 共享库进行单元测试
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
717 718 719 720 721 722 723 724 725
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-22-jacoco-coverage-for-functional-test/" class="link">
              基于 Jenkins &#43; JaCoCo 实现功能测试代码覆盖率统计
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
726 727 728 729 730 731 732 733 734
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-20-jenkins-ansible-springboot/" class="link">
              使用 Jenkins &#43; Ansible 实现 Spring Boot 自动化部署101
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
735 736 737 738 739 740 741 742 743
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-17-from-jenkins-to-jenkins-x/" class="link">
              从 Jenkins 到 Jenkins X
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
744 745 746 747 748 749 750 751 752
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-15-gsoc-annoncement/" class="link">
              19年 GSoC 中 Jenkins 的七个项目
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
753 754 755 756 757 758 759 760 761
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-14-devops-jenkins-credential-manage/" class="link">
              基于 Jenkins 的 DevOps 平台应该如何设计凭证管理
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
762 763 764 765 766 767 768 769 770
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-13-jenkins-book-gift/" class="link">
              Jenkins 公众号送书福利
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
771 772 773 774 775 776 777 778 779
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-09-jenkins-release/" class="link">
              Jenkins 版本发布
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
780 781 782 783 784 785 786 787 788
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-08-jenkins-plugin-develop-within-two-days-part02/" class="link">
              Jenkins 插件开发之旅:两天内从 idea 到发布(下篇)
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
789 790 791 792 793 794 795 796 797
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-07-jenkins-install-plugins-shell/" class="link">
              Jenkins 自动化安装插件
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
798 799 800 801 802 803 804 805 806
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/05/2019-05-06-jenkins-plugin-develop-within-two-days-part01/" class="link">
              Jenkins 插件开发之旅:两天内从 idea 到发布(上篇)
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
807 808 809 810 811 812 813 814 815
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-29-progressive-delivery-with-jenkins-x-automatic-cana/" class="link">
              使用 Jenkins X 渐进式交付:自动化金丝雀部署
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
816 817 818 819 820 821 822 823 824
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-26-progressive-delivery-with-jenkins-x/" class="link">
              使用 Jenkins X 渐进式交付
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
825 826 827 828 829 830 831 832 833
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-25-jenkins-ansible-nginx/" class="link">
              使用 Jenkins &#43; Ansible 实现自动化部署 Nginx
            </a>
          </li>
        
      
        
        
LinuxSuRen's avatar
LinuxSuRen 已提交
834 835 836
      
        
        
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-19-the-business-value-of-cd/" class="link">
              持续交付的商业价值
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-15-zabbix-monitor-jenkins/" class="link">
              使用 Zabbix 监控 Jenkins
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-12-brief-analysis-the-encryption-algorithm-of-the-built-in-jenkins-user-database/" class="link">
              简析 Jenkins 专有用户数据库加密算法
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-10-getting-started-with-docker-for-java-applications/" class="link">
              Java 应用使用 Docker 的入门指南:建立一个 CI/CD 流水线
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/04/2019-04-08-becoming-contributor-intro/" class="link">
              介绍:成为一名 Jenkins 贡献者的旅程
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/03/2019-03-13-electron-pipeline-demo/" class="link">
              Electron 应用的流水线设计
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
892
            <a href="/wechat/articles/2019/03/2019-03-13-ready-for-CDF/" class="link">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924
              为 Continuous Delivery Foundation 的成立感到兴奋
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/03/2019-01-08-mpl-modular-pipeline-library/" class="link">
              MPL - 模块化的流水线库
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/02/2019-02-27-jenkins-script-console-in-practice/" class="link">
              批量修改 Jenkins 任务的技巧
            </a>
          </li>
        
      
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/01/2019-01-16-webhook-firewalls/" class="link">
              在安全防火墙内通过 WebHook 触发构建
            </a>
          </li>
        
      
LinuxSuRen's avatar
LinuxSuRen 已提交
925 926 927 928 929 930 931 932 933
        
        
          <li class="db dib-l mb2 mr3">
            <a href="/wechat/articles/2019/06/2019-06-24-becoming-contributor-newbie-tickets/" class="link">
              成为一名 Jenkins 贡献者:对新手友好的工单
            </a>
          </li>
        
      
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
934 935 936 937 938 939 940 941
    </ul>
  </div>


    </div>
  </div>
</main>

LinuxSuRen's avatar
LinuxSuRen 已提交
942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957
<script type="text/javascript">
if(window.location.search == "?copy=true") {
  showCopyBut();
}

function copyMe(){
  var tempElements = [];

  var logoZone = document.createElement("div");
  logoZone.innerHTML = "<a href=\"https://jenkins-zh.cn\"><img width=\"520\" src=\"https://jenkins-zh.cn/wechat/images/grey-backgroud-jenkins-slogan.jpg\"/></a>";
  document.getElementById('prose').append(logoZone);
  tempElements.push(logoZone);
  var doc = document.getElementsByClassName('documentation-copy')[0];

  var articleHeader = document.createElement("div");
  tempElements.push(articleHeader);
958
  articleHeader.innerHTML = "本文首发于:<a href=\"https:\/\/jenkins-zh.cn\/wechat\/articles\/2019\/04\/2019-04-23-jenkins-master-shared-home\/\">Jenkins 中文社区</a>";
LinuxSuRen's avatar
LinuxSuRen 已提交
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027

  
  var rangeToSelect = document.createRange();
  rangeToSelect.selectNodeContents(doc);

  var data = window.getSelection();
  data.addRange(rangeToSelect);

  tempElements.push(appendArticleFooter(data.getRangeAt(0)));
  data.getRangeAt(0).insertNode(articleHeader);
  document.execCommand("copy", true, null);

  
  for(var i in tempElements) {
    tempElements[i].remove();
  }
  clearSelection();

  hideCopyBut();
}

function clearSelection(){
  window.getSelection().empty();
}

function showCopyBut() {
  document.getElementById('copyMe').style="";
}

function hideCopyBut() {
  document.getElementById('copyMe').style="display:none";
}

function appendArticleFooter(range) {
  var articleFooter = createArticleFooter();
  range.insertNode(articleFooter);
  return articleFooter;
}

function createArticleFooter() {
  var articleFooter = document.createElement("div");
  var authors = document.getElementsByClassName("author");
  var originalAuthors = document.getElementsByClassName("originalAuthor");
  var originalLinks = document.getElementsByClassName("originalLink");
  var articleFooterHtml = "";
  var isTranslated = false;
  if(originalAuthors.length > 0){
    articleFooterHtml += "<div>";
    if(originalLinks.length > 0){
      articleFooterHtml += "<a href=" + originalLinks[0].innerText + ">原文链接</a>&nbsp;&nbsp;&nbsp;&nbsp;";
    }
    articleFooterHtml += "作者:" + originalAuthors[0].innerText;
    articleFooterHtml += "</div>";
    isTranslated = true;
  }
  if(authors.length > 0){
    articleFooterHtml += "<div>";
    if(isTranslated) {
      articleFooterHtml += "译者:" + authors[0].innerText;
    } else {
      articleFooterHtml += "作者:" + authors[0].innerText;
    }
    articleFooterHtml += "</div>";
  }
  articleFooter.innerHTML = articleFooterHtml;
  return articleFooter;
}
</script>

1028
  </main>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1029

1030
  <footer class="bg-primary-color-dark ph4-ns pt4 relative w-100" role="contentinfo">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1031 1032 1033 1034
  <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">
1035 1036
<a href="https://github.com/jenkins-zh/jenkins-zh/graphs/contributors" target="_blank"
          class="link">Jenkins 社区贡献者</a> 维护<br />
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1037 1038 1039 1040 1041 1042
      </div>

      <ul class="center f6 list ma0 mv3 pa0 tc" style="display:none"><li class="dib mr3"><a href="https://github.com/jenkins-zh/jenkins-zh/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">
LinuxSuRen's avatar
LinuxSuRen 已提交
1043
          <a href="https://twitter.com/jenkinsci" target="_blank" class="dim link light-gray pv2">Twitter</a>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1044 1045
        </li>
        <li class="dib mr3">
1046 1047
          <a href="https://www.youtube.com/channel/UC63xz3pq26BBgwB3cnwCoqQ" target="_blank"
            class="dim link light-gray pv2">YouTube</a>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1048
        </li>
LinuxSuRen's avatar
LinuxSuRen 已提交
1049 1050 1051
        <li class="dib mr3">
          <a href="https://space.bilibili.com/433584098" target="_blank" class="dim link light-gray pv2">哔哩哔哩</a>
        </li>
1052
        <li class="dib mr3">
1053
          <a href="https://jcli.jenkins-zh.cn/" target="_blank" class="dim link light-gray pv2">Jenkins
1054 1055
            CLI</a>
        </li>
1056
        <li class="dib mr3">
1057
          <a href="https://community.jenkins-zh.cn/" target="_blank" class="dim link light-gray pv2">社区论坛</a>
1058
        </li>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1059 1060 1061 1062 1063 1064
      </ul>

      
    </div>

    <div>
1065 1066 1067 1068 1069
      <div style="color: #ffffff; display: inline-block; text-align: center; margin-right: 5px; margin-left: 5px;">优酷视频
        <div>
          <a href="https://i.youku.com/jenkinszh" target="_blank">
            <img src="/images/youku-qrcode.png" with="100" height="100">
          </a>
LinuxSuRen's avatar
LinuxSuRen 已提交
1070
        </div>
1071 1072 1073 1074 1075 1076
      </div>
      <div style="color: #ffffff; display: inline-block; text-align: center; margin-right: 5px; margin-left: 5px;">微信公众号
        <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>
LinuxSuRen's avatar
LinuxSuRen 已提交
1077 1078
        </div>
      </div>
1079 1080 1081 1082 1083 1084 1085
      <div style="color: #ffffff; display: inline-block; text-align: center; margin-right: 5px; margin-left: 5px;">微博
        <div>
          <a href="https://www.weibo.com/jenkinszh" target="_blank">
            <img src="/images/weibo-qrcode.png" with="100" height="100">
          </a>
        </div>
      </div>
1086
    </div>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1087 1088 1089

  </div>

1090
  <div class="f7 gray mb5 mb0-ns ph3 w-100"> 
1091
    <p class="dib mr4"><a href="http://www.beian.miit.gov.cn/" target="_blank" rel="nofollow" class="dim link light-gray pv2"><u>晋ICP备15000444号-2</u></a></p>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101
  </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">
LinuxSuRen's avatar
LinuxSuRen 已提交
1102
          博客
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1103 1104 1105
        </a>
    </li>
  
LinuxSuRen's avatar
LinuxSuRen 已提交
1106 1107 1108 1109 1110 1111
    <li  class="tl dib ma0 hover-bg-black w-100">
        <a href="/tutorial/" class="ttu f6 link primary-color-light overflow hover-white db brand-font  ma0 w-100 pv3 ph4">
          教程
        </a>
    </li>
  
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1112 1113 1114 1115 1116 1117 1118
    <li  class="tl dib ma0 hover-bg-black w-100">
        <a href="/event/" 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">
LinuxSuRen's avatar
LinuxSuRen 已提交
1119 1120 1121 1122 1123 1124
        <a href="/partner/" 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">
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141
        <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="flex dn-l justify-between">
LinuxSuRen's avatar
LinuxSuRen 已提交
1142
  <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">菜单</button>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1143

LinuxSuRen's avatar
LinuxSuRen 已提交
1144
  
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1145
</div>
LinuxSuRen's avatar
LinuxSuRen 已提交
1146
<script src="/dist/app.bundle.js" type="text/javascript"></script>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1147 1148
</div>

1149 1150 1151 1152 1153 1154
  <script>
    ((window.gitter = {}).chat = {}).options = {
      room: 'jenkinsci/chinese'
    };
  </script>
  <script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1155
</footer>
1156
  
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1157 1158 1159
<link href="/dist/auto-complete.css" rel="stylesheet">
<script type="text/javascript">
    
1160
        var baseurl = "https:\/\/jenkins-zh.cn";
LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1161 1162 1163 1164 1165 1166 1167 1168
    
</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>
LinuxSuRen's avatar
LinuxSuRen 已提交
1169 1170 1171 1172 1173 1174 1175 1176 1177
<script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?6db234f713318730f0e5f6a95bdd8d47";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
</script>
LinuxSuRen's avatar
LinuxSuRen 已提交
1178 1179 1180 1181 1182 1183 1184
<script>
(function(){
var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?6276dcef5c15f276644151772390c1f9":"https://jspassport.ssl.qhimg.com/11.0.1.js?6276dcef5c15f276644151772390c1f9";
document.write('<script src="' + src + '" id="sozz"><\/script>');
})();
</script>

LinuxSuRen's avatar
deploy  
LinuxSuRen 已提交
1185

1186 1187 1188
</body>

</html>