【问题标题】:How to configure the buildbot docker container using BUILDBOT_CONFIG_URL如何使用 BUILDBOT_CONFIG_URL 配置 buildbot docker 容器
【发布时间】:2019-08-29 12:16:23
【问题描述】:

用于 buildbot 的 official docker 容器的文档要求 BUILDBOT_CONFIG_URL 环境变量指向可通过 HTTP 访问的包含 master.cfg 文件的 .tar.gz 文件。

  • 如果master.cfg 文件不是单个文件而是导入其他文件(如private.py 文件),这应该如何工作?
  • 是否也可以使用物理配置文件配置 docker 容器?
version: '2'
services:
  buildbot:
    image: buildbot/buildbot-master:master
    env_file:
      - db.env
    environment:
      - BUILDBOT_CONFIG_DIR=config
      - BUILDBOT_CONFIG_URL=https://github.com/buildbot/buildbot-docker-example-config/archive/master.tar.gz
      - BUILDBOT_WORKER_PORT=9989
      - BUILDBOT_WEB_URL=http://localhost:8010/
      - BUILDBOT_WEB_PORT=tcp:port=8010
    links:
      - db
    depends_on:
      - db
    ports:
      - "8010:8010"
  db:
    env_file:
      - db.env
    image: "postgres:9.4"
    expose:
      - 5432

【问题讨论】:

    标签: docker buildbot


    【解决方案1】:

    docker 示例使用这个文件作为 docker 镜像的基础: https://github.com/buildbot/buildbot/blob/master/master/Dockerfile

    将这个脚本定义为其入口点: https://github.com/buildbot/buildbot/blob/master/master/docker/start_buildbot.sh

    在该脚本中,配置是通过下载和提取显式处理的:

    until curl -sL $BUILDBOT_CONFIG_URL | tar -xz --strip-components=1 --directory=$B/$BUILDBOT_CONFIG_DIR

    并进一步链接为 master.cfg 文件。所以总而言之,魔术取决于设置配置文件的附加脚本,使其与典型设置相匹配。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-29
      • 2021-07-03
      • 1970-01-01
      • 2019-07-31
      • 2015-07-20
      • 1970-01-01
      相关资源
      最近更新 更多