Observe --force-rebuild
All checks were successful
Lint Checks / Run linter (pull_request) Successful in 37s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m24s
Smoke Test / Run basic test suite (pull_request) Successful in 4m21s
Deploy Test / Run deploy test suite (pull_request) Successful in 5m13s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Successful in 7m39s

This commit is contained in:
David Boreham 2024-07-04 15:57:24 -06:00
parent 0938137df0
commit 3750f53b91

View File

@ -117,8 +117,11 @@ def process_app_deployment_request(
shutil.copyfile(env_filename, deployment_config_file)
needs_k8s_deploy = False
if force_rebuild:
logger.log("--force-rebuild is enabled so the container will always be built now, even if nothing has changed in the app")
# 6. build container (if needed)
if not deployment_record or deployment_record.attributes.application != app.id:
# TODO: add a comment that explains what this code is doing (not clear to me)
if not deployment_record or deployment_record.attributes.application != app.id or force_rebuild:
needs_k8s_deploy = True
# check if the image already exists
shared_tag_exists = remote_image_exists(image_registry, app_image_shared_tag)