Skip to content

Instantly share code, notes, and snippets.

@anish
Created March 16, 2016 22:03
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/ac0d76f95963380d8782 to your computer and use it in GitHub Desktop.
Save anish/ac0d76f95963380d8782 to your computer and use it in GitHub Desktop.
@renderer
def getrepoPath(props):
print util.Property('buildername')
if props.hasProperty('buildername'):
bname = props.getProperty('buildername')
else:
bname = 'crpmbuild'
props.setProperty('halfive', 'foo', 'bar')
print props
return bname
container_conf = {}
container_conf['network_mode'] = 'host'
container_conf['dns'] = ['8.8.8.8','8.8.4.4']
c['slaves'] = [
buildslave.DockerLatentWorker('docker_worker', 'password',
docker_host='unix:///var/run/docker.sock',
followStartupLogs=True,
image=getrepoPath,
version='1.19',
volumes=['/tmp/t/tmp/t','/tmp/3/:tmp/2' ],
#volumes=[ Interpolate('/opt/repos:/buildslave/%(kw:path)s/build/repos', path=getrepoPath) ],
hostconfig=container_conf),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment