【问题标题】:Update Jenkins Plugins via Artifactory通过 Artifactory 更新 Jenkins 插件
【发布时间】:2022-05-16 18:23:25
【问题描述】:

我想通过 Artifactory 更新 Jenkins 插件。

  1. 创建一个名为 Jenkins-update 的远程仓库
  2. 创建一个名为 jenkins-update-center 的本地存储库
  3. 从 repo Jenkins-update 获取 update-center.json 到本地,并在 update-center.json 中将 URL 从 'http://updates.jenkins-ci.org/' 修改为我自己的 URL 'https://artifacts.xxx.com/artifactory/Jenkins-update/',然后放入 update-center.json进入本地仓库。

    #!/bin/sh
    curl -L -o /tmp/update-center.json http://localhost:8081/artifactory/Jenkins-update-cache/update-center.json
    sed -i 's#http://updates.jenkins-ci.org/#https://artifacts.xxx.com/artifactory/Jenkins-update/#g' /tmp/update-center.json
    curl -L -uuser:pass -T /tmp/update-center.json "http://localhost:8081/artifactory/jenkins-update-center/update-center.json"
    
  4. 在 Jenkins 中将默认更新站点从“http://updates.jenkins-ci.org/”更改为“https://artifacts.xxx.com/artifactory/jenkins-update-center/update-center.json

There is an error 'SHA-512 digest mismatch: expected=49a22dc23f739a76623d10128b6803f79e0489de3ded0f1d01f3dfba4557136c7f318baaf4749a7713ec4b3f56633f2ac3afc4703e87d423ede029d68f84c74d in 'update site 'default''' when I click 'check now' button.

我应该怎么做才能让 Jenkins 从 Artifactory 更新插件?

Tkx

【问题讨论】:

    标签: jenkins artifactory


    【解决方案1】:

    一旦 update-center.json 的内容发生变化,您需要重新生成该文件的“签名”部分。 为此,您需要生成您的密钥对(在How to create a local mirror of public Jenkins update site? 中查看更多详细信息)

    您也可以使用以下建议的方法:

    可能有更好的方法,在可以访问互联网的系统上安装沙箱 Jenkins。您使用 UI 更新服务器,然后您可以彻底测试更新后的 Jenkins。完成后,您只需将 war 和 hpi 文件复制到您的“生产”Jenkins。现在你甚至有了一个很好的流程和质量保证。

    另一种方法是在您的 Jenkins 和 Artifactory 服务器之间设置一个透明的 https 代理 - 在这种情况下 update-center.json 不会更改并且签名验证应该可以正常工作。

    致以最诚挚的问候,

    德米特罗·戈尔布诺夫

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-07-29
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      • 2022-10-06
      • 2015-08-08
      • 2016-04-09
      相关资源
      最近更新 更多