buildmaster-config icon indicating copy to clipboard operation
buildmaster-config copied to clipboard

Give an example test file for /etc/buildbot/settings.yaml

Open emmatyping opened this issue 3 years ago • 3 comments

Hi! I am planning on adding support for cross compiling and then Emscripten as a platform. However I am unsure how to set up a realistic testing environment.

I can run the current master code, but it seems that the buildbot master relies on a file /etc/buildbot/settings.yaml to configure workers.

I am unsure of what the format of the file should be for testing. Could you give an example of what this file should look like please? (I can guess some of the information from settings.py, but I don't know what the configuration looks like for workers)

emmatyping avatar Jan 20 '22 00:01 emmatyping

Hi @ethanhs,

I can try to give you a sample later today but in theory, you don't need it for what you want. You may be able to just configure a local worker:

https://docs.buildbot.net/latest/manual/configuration/workers.html#local-workers

You can modify locally this:

https://github.com/python/buildmaster-config/blob/15552ea4890e4404dab4732d878dc8872ea1572a/master/master.cfg#L92

To point only to your local worker. It has been a while since I did that in the past so I am sure they may be some gotchas but that's how I have iterated in the past when doing modifications to the worker workflow or plugins.

pablogsal avatar Jan 20 '22 14:01 pablogsal

First off, we should probably adjust https://github.com/python/buildmaster-config/blob/15552ea4890e4404dab4732d878dc8872ea1572a/master/master.cfg#L82 to check a PYBUILDBOT_SETTINGS_PATH environment variable for a replacement path so you don't have to stick a local test config file in /etc/buildbot. From there, your test settings file could just be use_local_worker: true to use the single local worker, and you can add anything else you need as you find you need it :). The only worker configuration you might need would be something like:

workers:
    smith-emscripten:
        password: somepassword

zware avatar Jan 20 '22 17:01 zware

Ok, thank you! I will try that out. I do think having a configurable path with an example would be good, because it would prevent mistakes like committing temporary changes to master.cfg.

emmatyping avatar Jan 20 '22 18:01 emmatyping