buildbot / buildbot_travis

Adaptors to make Buildbot more like travis
MIT License
126 stars 42 forks source link

allow arbitrary images #66

Closed ddavidebor closed 7 years ago

ddavidebor commented 7 years ago

it would be really really nice if buidbot_travis allowed arbitrary docker images to be used, in a way similar to what wercker-ci and drone-ci allow.

This could be implemented separately by the language tag with a "box" tag,

What do you think about it?

seankelly commented 7 years ago

I do this by using a renderer for the image.

ddavidebor commented 7 years ago

@seankelly do you have an example you can share ?

seankelly commented 7 years ago

With #62, properties are set for os, dist, and language. I use OpenStackLatentWorker, so something like:

c['workers'].append(worker.OpenStackLatentWorker(
    ...
    block_devices=[
        {'uuid': travis_image,
        'volume_size': 10}])
))

@util.renderer
def travis_image(props):
    ...

With the extra properties available, I can make a decision on which image to use based on the dist and language.

ddavidebor commented 7 years ago

Mmmh, got it.

I'm still interested in a discussion for this to be implemented in a way that supports the usability intended for buildbot_travis.

tardyp commented 7 years ago

you can use following:

%(prop:docker-image:-buildbot/buildbot-worker)s

in docker image configuration

image

Note that It actually didn't work before #65