Minor updates

This commit is contained in:
Shashi 2021-12-25 16:51:52 +05:30
parent bea032dc78
commit c9d1ffa117
Signed by untrusted user: Ss_singh
GPG Key ID: C1A296E379639C12
2 changed files with 7 additions and 9 deletions

View File

@ -5,7 +5,7 @@ import re
@util.renderer
def is_build_script_available(props):
# Actual check will got here
return props.getProperty("jobname", default="") != ""
return props.getProperty("build_available", default=False)
@util.renderer
@ -16,7 +16,7 @@ def isnt_build_script_available(props):
@util.renderer
def is_test_script_available(props):
# Actual check will got here
return props.getProperty("jobname", default="") != ""
return props.getProperty("test_available", default=False)
@util.renderer

View File

@ -107,7 +107,7 @@ def get_dockerfile_contents(path, os_codename):
}[os_codename]
def trigger_child_hooks(buildbotUrl: str, os_codename: str, directory=".buildbot"):
def trigger_child_hooks(buildbotUrl: str, os_codename: str, repository, branch, jobname, directory=".buildbot"):
request_url = buildbotUrl + ty
# List all jobs in the directory
@ -129,6 +129,9 @@ def trigger_child_hooks(buildbotUrl: str, os_codename: str, directory=".buildbot
),
"build_script_available": is_build_script_available(build_script_exists),
"test_script_available": is_test_script_available(test_script_exists),
"repository": repository,
"branch": branch,
"jobname": jobname,
}
requests.post(request_url, headers=request_headers, data=request_data)
@ -200,12 +203,7 @@ if __name__ == "__main__":
buildbotUrl = sys.argv[4]
os_codename = sys.argv[5]
# add these into the request_data
request_data["jobname"] = jobname
request_data["repository"] = repository
request_data["branch"] = branch
trigger_child_hooks(buildbotUrl, os_codename)
trigger_child_hooks(buildbotUrl, os_codename, repository, branch, jobname)
else:
print(
"Usage: python3 multibuild.py <jobname> <repository> <branch> <buildbotUrl> <os_codename>"