Jenkins 从滚动发布转向稳定 (LTS) 发布

Jenkins move from rolling release to stable (LTS) release

我正在使用 Jenkins 滚动发布,我试图转移到 Jenkins 的 LTS 版本,但我没有找到从滚动发布转移到 LTS 版本的直接方法。

我的旧 Jenkins 中有很多配置,所以无法安装新的 Jenkins。

有什么方法可以从滚动版本转移到 LTS 版本吗?

来自 https://wiki.jenkins-ci.org/display/JENKINS/LTS+Release+Line :

  1. 备份您的 Jenkins 安装(例如整个 Jenkins 目录)

  2. 下载所需的 jenkins.war 版本,在本例中为 LTS one

  3. 关闭詹金斯

  4. 在你的 Jenkins 目录中复制新的 jenkins.war 覆盖旧的

  5. 再次启动 Jenkins

  6. 从上面的 wiki 页面引用这句话:

    If you had a Latest&Greatest release running before and now have switched to LTS, you should open Manage Jenkins->Manage Plugins->Advanced and press "Check now". This way you ensure to get the proper update notifications for LTS and LTS-compatible plugins instead of Latest&Greatest. After you do this you may need to remove the contents of ${JENKINS_HOME}/updates to ensure that Jenkins shows the correct updates for the LTS stream.

除上述答案外,在 Ubuntu 上仅删除更新文件夹对我不起作用。

这是我理解的逻辑,

1. For first LTS version intallation, LTS updates json file in 
   installed. It feteches LTS version and update accordingly to next LTS json.
2. But if once you used rolling version, it updates the "updates" 
   jason into rolling version.
3. Even if you delete updates folder, for next bootup, even it is LTS 
   version, it generates rolling version updates folder. Then it
   checks rolling version again.

所以要将其恢复到 LTS 版本,

1. Stop Jenkins
2. Delete updates folder
3. Install latest LTS version on another PC with "sudo apt-get install jenkins".
4. Copy the updates folder to current Jenkins folder
5. Restart Jenkins

此时,您将获得 LTS 更新文件夹,并且不会再次获取滚动版本。