aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildbot_gentoo_ci/steps/nodes.py34
1 files changed, 14 insertions, 20 deletions
diff --git a/buildbot_gentoo_ci/steps/nodes.py b/buildbot_gentoo_ci/steps/nodes.py
index 7a01cbb..c1928ba 100644
--- a/buildbot_gentoo_ci/steps/nodes.py
+++ b/buildbot_gentoo_ci/steps/nodes.py
@@ -77,30 +77,26 @@ class SetupBuildStepsForDocker(BuildStep):
self.gentooci = self.master.namedServices['services'].namedServices['gentooci']
node_data = self.getProperty("node_data")
image_data = self.getProperty("image_data")
- dockerfile = self.getProperty("image_data")['dockerfile'] + '.Dockerfile'
+ dockerfile = os.path.join('Project', self.getProperty("project_data")['uuid'],'docker', image_data['dockerfile'] + '.Dockerfile')
+ repository_data = yield self.gentooci.db.repositorys.getRepositoryByUuid(self.getProperty("project_data")['settings_repository_uuid'])
dockerfile_path = os.path.join(self.master.basedir, 'docker')
#FIXME: Set build timeout in config
self.build_timeout = 6600
aftersteps_list = []
- aftersteps_list.append(steps.FileDownload(
- flunkOnFailure=True,
- name='Upload Dockerfile',
- mastersrc = os.path.join(dockerfile_path, dockerfile),
- workerdest = dockerfile
- ))
+ aftersteps_list.append(steps.GitLab(repourl=repository_data['url'],
+ name = 'RunGit',
+ descriptionDone=repository_data['name'],
+ mode=repository_data['mode'],
+ method=repository_data['method'],
+ submodules=True,
+ alwaysUseLatest=repository_data['alwaysuselatest']
+ ))
# build the gentoo docker buildbot-worker image
# set the build args
self.buildargs = {}
- # set PROJECTUUID
- self.buildargs['PROJECTUUID'] = self.getProperty("project_uuid")
- # set ACCEPT_KEYWORDS
- keyword_data = yield self.gentooci.db.keywords.getKeywordById(self.getProperty('project_data')['keyword_id'])
- if self.getProperty('project_data')['status'] == 'unstable':
- self.buildargs['KEYWORDS'] = '~' + keyword_data['name']
- else:
- self.buildargs['KEYWORDS'] = keyword_data['name']
- # set ARCH
- self.buildargs['ARCH'] = keyword_data['name']
+ # set PROJECTUUID and PROJECTNAME
+ self.buildargs['PROJECTUUID'] = self.getProperty("project_data")['uuid']
+ self.buildargs['PROJECTNAME'] = self.getProperty("project_data")['name']
# set MAKEOPTS
# set USE
# set CFLAGS
@@ -132,12 +128,10 @@ class SetupBuildStepsForDocker(BuildStep):
flunkOnFailure=True,
name='Build docker buildbot-worker image',
command=['docker',
- 'buildx',
'build',
'--file', dockerfile,
'--build-arg', 'PROJECTUUID='+ self.buildargs['PROJECTUUID'],
- '--build-arg', 'KEYWORDS=' + self.buildargs['KEYWORDS'],
- '--build-arg', 'ARCH=' + self.buildargs['ARCH'],
+ '--build-arg', 'PROJECTNAME='+ self.buildargs['PROJECTNAME'],
'--build-arg', 'BINHOSTURL=' + self.buildargs['BINHOSTURL'],
'--build-arg', 'BOOTSTRAPTAG=' + self.buildargs['BOOTSTRAPTAG'],
'--tag', image_data['tag'],