allow e2e test image to be changed via env variable (#15200)

as we patch our base images, this e2e image needs to be updated all the time as well.
Instead of changing this with a PR all the time this PR makes the e2e container image version configurable through the ENV.


Co-authored-by: Jirka <jirka.borovec@seznam.cz>
This commit is contained in:
Raphael Randschau 2022-10-28 08:40:59 -07:00 committed by GitHub
parent 2e72a4c801
commit 273269ef1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ class WorkWithCustomBaseImage(LightningWork):
def __init__(self, cloud_compute: CloudCompute = CloudCompute(), **kwargs):
# this image has been created from ghcr.io/gridai/base-images:v1.8-cpu
# by just adding an empty file at /content/.e2e_test
custom_image = "ghcr.io/gridai/image-for-testing-custom-images-in-e2e:v1.12"
image_tag = os.getenv("LIGHTNING_E2E_TEST_IMAGE_VERSION", "v0.0.1")
custom_image = f"ghcr.io/gridai/image-for-testing-custom-images-in-e2e:{image_tag}"
build_config = BuildConfig(image=custom_image)
super().__init__(parallel=True, **kwargs, cloud_compute=cloud_compute, cloud_build_config=build_config)