Last active
March 18, 2016 21:30
-
-
Save anish/318038bae008c646a1a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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