File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ def _get_target_dir(sub_test_name: str) -> str:
25
25
def setup_oidc (sub_test_name : str ) -> dict [str , str ] | None :
26
26
target_dir = _get_target_dir (sub_test_name )
27
27
env = os .environ .copy ()
28
+
29
+ if sub_test_name == "eks" and "AWS_ACCESS_KEY_ID" in os .environ :
30
+ # Store AWS creds for kubectl access.
31
+ for key in ["AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" , "AWS_SESSION_TOKEN" ]:
32
+ if key in os .environ :
33
+ write_env (key , os .environ [key ])
34
+
28
35
if sub_test_name == "azure" :
29
36
env ["AZUREOIDC_VMNAME_PREFIX" ] = "PYTHON_DRIVER"
30
37
if "-remote" not in sub_test_name :
@@ -34,12 +41,6 @@ def setup_oidc(sub_test_name: str) -> dict[str, str] | None:
34
41
run_command (f"bash { target_dir } /run-self-test.sh" )
35
42
return None
36
43
37
- if sub_test_name == "eks" and "AWS_ACCESS_KEY_ID" in os .environ :
38
- # Store AWS creds for kubectl access.
39
- for key in ["AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" , "AWS_SESSION_TOKEN" ]:
40
- if key in os .environ :
41
- write_env (key , os .environ [key ])
42
-
43
44
source_file = None
44
45
if sub_test_name == "test" :
45
46
source_file = f"{ target_dir } /secrets-export.sh"
You can’t perform that action at this time.
0 commit comments