返回介绍

2.12.1. Upgrading to Buildbot 4.0 (not released)

发布于 2023-09-20 23:50:39 字数 4155 浏览 0 评论 0 收藏 0

Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

2.12.1. Upgrading to Buildbot 4.0 (not released)

Upgrading a Buildbot instance from 3.x to 4.0 may require some work to achieve.

The recommended upgrade procedure is as follows:

  • Upgrade to the last released BuildBot version in 3.x series.

  • Remove usage of the deprecated APIs. All usages of deprecated APIs threw a deprecation warning at the point of use. If the code does not emit deprecation warnings, it’s in a good shape in this regard. You may need to run the master on a real workload in order to force all deprecated code paths to be exercised.

  • Upgrade to the latest Buildbot 4.0.x release.

  • (Optional) Upgrade to newest Buildbot 4.x. The newest point release will contain bug fixes and functionality improvements.

2.12.1.1. Web frontend

Buildbot 4.0 removes the legacy web frontend written in AngularJS. In simple Buildbot installations there is nothing that needs to be done except to install compatible versions of any www plugins that are used. The following plugins are maintained as part of Buildbot and can be upgraded seamlessly by just installing new, compatible version:

  • buildbot-www (main web frontend)

  • buildbot-console-view

  • buildbot-grid-view

  • buildbot-waterfall-view

Custom plugins

If the Buildbot installation uses plugins that are developed outside Buildbot, these will need to be rewritten to use the new Buildbot plugin APIs that expect the plugin to be written in React. In such case the best approach is to rewrite any custom plugins into React while still using Buildbot 3.x and convert to 4.x once everything is ready.

More specifically, the recommended approach is as follows:

  • Upgrade to the last released BuildBot version in 3.x series.

  • Prepare the development environment

    • Install buildbot-www-react with the same version.

    • Install any Buildbot plugins that already have a version that is compatible with React. For example buildbot-console-view has a React equivalent buildbot-react-console-view.

    • Add 'base_react': {} key-value pair to the www plugin dictionary. For example, in the default installation the configuration would look like this: c['www'] = {port: 8080, plugins={'base_react': {}}}.

      Other enabled plugins will need their keys in the dictionary changed. For example, the compatibility Buildbot plugins will have the following names:

      • console_view as react_console_view

      • grid_view as react_grid_view

      • waterfall_view as react_waterfall_view

  • Rewrite any custom Buildbot plugins into React and new Buildbot plugin APIs in the development environment.

  • Replace the production setup with what was tested in the development environment section above.

  • Upgrade to Buildbot 4.x series

2.12.1.2. Build status generators

The subject argument of BuildStatusGenerator and BuildSetStatusGenerator has been removed. The equivalent is setting the subject argument of the message formatter.

2.12.1.3. Message formatters

The wantLogs argument to message formatters has been removed. The equivalent is setting both want_logs and want_logs_content to the previous value of wantLogs.

The wantSteps and wantProperties arguments have been renamed to want_steps and want_properties respectively.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文