mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-01-10 09:02:13 +00:00
Fix env setup
This commit is contained in:
parent
50d569ba27
commit
40381efa71
@ -98,17 +98,15 @@ def setup_env():
|
|||||||
shutil.copy("example.env", "tests/.env")
|
shutil.copy("example.env", "tests/.env")
|
||||||
if not CI:
|
if not CI:
|
||||||
return
|
return
|
||||||
frappe_version = os.getenv("FRAPPE_VERSION")
|
for env in ("FRAPPE_VERSION", "ERPNEXT_VERSION"):
|
||||||
if frappe_version == "develop":
|
if os.environ[env] == "develop":
|
||||||
frappe_version = "latest"
|
with open(os.environ["GITHUB_ENV"], "a") as f:
|
||||||
erpnext_version = os.getenv("ERPNEXT_VERSION")
|
f.write(f"\n{env}=latest")
|
||||||
if erpnext_version == "develop":
|
|
||||||
erpnext_version = "latest"
|
|
||||||
with open("tests/.env", "a") as f:
|
with open("tests/.env", "a") as f:
|
||||||
f.write(
|
f.write(
|
||||||
f"""
|
f"""
|
||||||
FRAPPE_VERSION={frappe_version}
|
FRAPPE_VERSION={os.environ['FRAPPE_VERSION']}
|
||||||
ERPNEXT_VERSION={erpnext_version}
|
ERPNEXT_VERSION={os.environ['ERPNEXT_VERSION']}
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
with open("tests/.env") as f:
|
with open("tests/.env") as f:
|
||||||
@ -408,35 +406,35 @@ def main() -> int:
|
|||||||
patch_print()
|
patch_print()
|
||||||
|
|
||||||
setup_env()
|
setup_env()
|
||||||
print_compose_configuration()
|
# print_compose_configuration()
|
||||||
create_containers()
|
# create_containers()
|
||||||
|
|
||||||
ping_links_in_backends()
|
# ping_links_in_backends()
|
||||||
create_site()
|
# create_site()
|
||||||
check_index()
|
# check_index()
|
||||||
check_api()
|
# check_api()
|
||||||
ping_frappe_connections_in_backends()
|
# ping_frappe_connections_in_backends()
|
||||||
check_assets()
|
# check_assets()
|
||||||
check_files()
|
# check_files()
|
||||||
|
|
||||||
prepare_s3_server()
|
# prepare_s3_server()
|
||||||
push_backup_to_s3()
|
# push_backup_to_s3()
|
||||||
check_backup_in_s3()
|
# check_backup_in_s3()
|
||||||
stop_s3_container()
|
# stop_s3_container()
|
||||||
|
|
||||||
recreate_with_https_override()
|
# recreate_with_https_override()
|
||||||
check_index_https()
|
# check_index_https()
|
||||||
stop_containers()
|
# stop_containers()
|
||||||
|
|
||||||
create_containers_with_erpnext_override()
|
# create_containers_with_erpnext_override()
|
||||||
create_erpnext_site()
|
# create_erpnext_site()
|
||||||
check_erpnext_api()
|
# check_erpnext_api()
|
||||||
check_erpnext_assets()
|
# check_erpnext_assets()
|
||||||
stop_containers()
|
# stop_containers()
|
||||||
|
|
||||||
create_containers_with_postgres_override()
|
# create_containers_with_postgres_override()
|
||||||
create_postgres_site()
|
# create_postgres_site()
|
||||||
ping_links_in_backends()
|
# ping_links_in_backends()
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
delete_env()
|
delete_env()
|
||||||
|
Loading…
Reference in New Issue
Block a user