ref_project = trigger_info(os.getenv('TRIGGER_INFO'))['target']
target_project = 'home:devel:Build:%s' % ref_project
- package_to_build = 'appcore-widget'
+ package_to_build = os.getenv('REF_BUILDCHECK_PKG_PROFILE')
if ':Base:ref:' in ref_project:
- package_to_build = 'unzip'
+ package_to_build = os.getenv('REF_BUILDCHECK_PKG_BASE')
build = BuildService(os.getenv('OBS_API_URL'), \
os.getenv('OBS_API_USERNAME'), \
build.delete_project(target_project)
sleep(5)
build.create_project(target_project, src=ref_project.split(':ref:')[0]) # from base
- for flag in ("build", "publish", "debuginfo", "useforbuild"):
+ for flag in ("build", "publish"):
build.disable_build_flag(target_project, repo = None, flag=flag, status="disable")
build.create_copy_pac(ref_project, package_to_build, target_project, package_to_build)
while True:
sleep(30)
build_result = precheck_result()
- if build_result not in (0, -1):
+ if build_result not in (result_map['Pass'], result_map['Fail']):
continue
break
- build.delete_project(target_project)
+ if build_result == result_map['Pass']:
+ build.delete_project(target_project)
return build_result
if __name__ == '__main__':
mf.write(saved_info)
mygit.add_files(GIT_FILE_NAME, True)
try:
- mygit.commit_staged('%s' % project)
+ mygit.commit_staged('%s' % project.replace('home:prerelease:',''))
mygit.push(repo = 'origin', src = branch)
except Exception as err:
print '\n** Commit or push to git error, %s\n' % err