Skip to content

Instantly share code, notes, and snippets.

@anish
Last active March 18, 2016 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anish/318038bae008c646a1a2 to your computer and use it in GitHub Desktop.
Save anish/318038bae008c646a1a2 to your computer and use it in GitHub Desktop.
from buildbot.process.properties import renderer,Interpolate
@renderer
def getrepoPath(props):
if props.hasProperty('buildername'):
return props.getProperty('buildername')
else:
return 'foobar'
####### BUILDSLAVES
# The 'slaves' list defines the set of recognized buildslaves. Each element is
# a BuildSlave object, specifying a unique slave name and password. The same
# slave name and password must be configured on the slave.
container_conf = {}
container_conf['network_mode'] = 'host'
container_conf['dns'] = ['8.8.8.8','8.8.4.4']
c['slaves'] = [
buildslave.DockerLatentBuildSlave('docker_slave', auth['worker_password'],
docker_host='unix:///var/run/docker.sock',
followStartupLogs=True,
image='crpmbuild',
version='1.19',
volumes=[ Interpolate('/opt/repos:/buildslave/repos/%(kw:path)s/', path=getrepoPath) ],
hostconfig=container_conf),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment