mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #1132 from dotcloud/776-testing-commit
testing, issue #776: Ensure docker-ci test docker code as it was at commit time
This commit is contained in:
commit
35e87ee571
1 changed files with 11 additions and 12 deletions
|
@ -5,6 +5,7 @@ from buildbot.schedulers.basic import SingleBranchScheduler
|
|||
from buildbot.changes import filter
|
||||
from buildbot.config import BuilderConfig
|
||||
from buildbot.process.factory import BuildFactory
|
||||
from buildbot.process.properties import Interpolate
|
||||
from buildbot.steps.shell import ShellCommand
|
||||
from buildbot.status import html
|
||||
from buildbot.status.web import authz, auth
|
||||
|
@ -15,20 +16,20 @@ PORT_MASTER = 9989 # Port where buildbot master listen buildworkers
|
|||
TEST_USER = 'buildbot' # Credential to authenticate build triggers
|
||||
TEST_PWD = 'docker' # Credential to authenticate build triggers
|
||||
BUILDER_NAME = 'docker'
|
||||
BUILDPASSWORD = 'pass-docker' # Credential to authenticate buildworkers
|
||||
GITHUB_DOCKER = "github.com/dotcloud/docker"
|
||||
DOCKER_PATH = "/data/docker"
|
||||
BUILDER_PATH = "/data/buildbot/slave/{0}/build".format(BUILDER_NAME)
|
||||
GITHUB_DOCKER = 'github.com/dotcloud/docker'
|
||||
DOCKER_PATH = '/data/docker'
|
||||
BUILDER_PATH = '/data/buildbot/slave/{0}/build'.format(BUILDER_NAME)
|
||||
DOCKER_BUILD_PATH = BUILDER_PATH + '/src/github.com/dotcloud/docker'
|
||||
BUILDBOT_PWD = 'pass-docker'
|
||||
|
||||
|
||||
c = BuildmasterConfig = {}
|
||||
|
||||
c['title'] = "Docker"
|
||||
c['titleURL'] = "waterfall"
|
||||
c['buildbotURL'] = "http://0.0.0.0:{0}/".format(PORT_WEB)
|
||||
c['buildbotURL'] = "http://docker-ci.dotcloud.com/"
|
||||
c['db'] = {'db_url':"sqlite:///state.sqlite"}
|
||||
c['slaves'] = [BuildSlave('buildworker', BUILDPASSWORD)]
|
||||
c['slaves'] = [BuildSlave('buildworker', BUILDBOT_PWD)]
|
||||
c['slavePortnum'] = PORT_MASTER
|
||||
|
||||
c['schedulers'] = [ForceScheduler(name='trigger',builderNames=[BUILDER_NAME])]
|
||||
|
@ -36,14 +37,12 @@ c['schedulers'].append(SingleBranchScheduler(name="all",
|
|||
change_filter=filter.ChangeFilter(branch='master'),treeStableTimer=None,
|
||||
builderNames=[BUILDER_NAME]))
|
||||
|
||||
# Docker test command
|
||||
test_cmd = ("cd /tmp; rm -rf {0}; export GOPATH={0}; go get -d {1}; cd {2}; "
|
||||
"go test").format(BUILDER_PATH,GITHUB_DOCKER,DOCKER_BUILD_PATH)
|
||||
|
||||
# Builder
|
||||
factory = BuildFactory()
|
||||
factory.addStep(ShellCommand(description='Docker',logEnviron=False,
|
||||
usePTY=True,command=test_cmd))
|
||||
factory.addStep(ShellCommand(description='Docker',logEnviron=False,usePTY=True,
|
||||
command=["sh", "-c", Interpolate("cd ..; rm -rf build; export GOPATH={0}; "
|
||||
"go get -d {1}; cd {2}; git reset --hard %(src::revision:-unknown)s; "
|
||||
"go test -v".format(BUILDER_PATH,GITHUB_DOCKER,DOCKER_BUILD_PATH))]))
|
||||
c['builders'] = [BuilderConfig(name=BUILDER_NAME,slavenames=['buildworker'],
|
||||
factory=factory)]
|
||||
|
||||
|
|
Loading…
Reference in a new issue