Commit cd08e38c authored by José Henrique's avatar José Henrique
Browse files

Rework bind mounts

parent 31b6d8e3
......@@ -55,5 +55,8 @@ build_env_vars["generate_incremental"] = (
# Others
build_env_vars["working_dir"] = (
"/mnt/roms" if not os.getenv("working_dir")
else os.getenv("working_dir")) + "/pe_" + build_env_vars["version"]
build_env_vars["ccache_dir"] = (
"/mnt/roms/ccache" if not os.getenv("working_dir")
else os.getenv("working_dir"))
build_env_vars["runner_name"] = build_env_vars["CI_RUNNER_DESCRIPTION"]
......@@ -70,7 +70,10 @@ def start_build(environment_vars):
image_name = "pixelexperience/android_build_ci"
volumes_to_mount = {
environment_vars["working_dir"]: {
"bind": "/roms", "mode": "rw"
"bind": "/android", "mode": "rw"
},
environment_vars["ccache_dir"]: {
"bind": "/ccache", "mode": "rw"
},
"/home/gitlab-runner/.gitcookies": {
"bind": "/home/android_build/.gitcookies", "mode": "ro"
......
......@@ -34,19 +34,16 @@ def init_post_build_env_vars():
os.chdir("post_build")
working_dir = result["working_dir"] + \
"/pe_" + result["version"]
unsigned_target_files_path_glob = working_dir + \
unsigned_target_files_path_glob = result["working_dir"] + \
"/out/target/product/*/obj/PACKAGING/target_files_intermediates/*-target_files-*.zip"
result["unsigned_target_files_path"] = None
build_prop = parse_build_prop_file(
find_file(working_dir +
find_file(result["working_dir"] +
"/out/target/product/*/system/build.prop"))
default_prop = parse_build_prop_file(
find_file(working_dir +
find_file(result["working_dir"] +
"/out/target/product/*/system/etc/prop.default"))
if "org.pixelexperience.version.display" not in build_prop:
......@@ -65,7 +62,7 @@ def init_post_build_env_vars():
result["build_name"].replace(".zip", ".img"))
result["changelog_path"] = (
find_file(working_dir +
find_file(result["working_dir"] +
"/out/target/product/*/" +
result["build_name"].replace(".zip", "") + "*.txt"))
if result["changelog_path"] is None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment