File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ def setup_oidc(sub_test_name: str) -> dict[str, str] | None:
34
34
run_command (f"bash { target_dir } /run-self-test.sh" )
35
35
return None
36
36
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
+
37
43
source_file = None
38
44
if sub_test_name == "test" :
39
45
source_file = f"{ target_dir } /secrets-export.sh"
@@ -60,11 +66,6 @@ def setup_oidc(sub_test_name: str) -> dict[str, str] | None:
60
66
write_env ("AZUREOIDC_RESOURCE" , config ["AZUREOIDC_RESOURCE" ])
61
67
elif sub_test_name == "gcp-remote" :
62
68
write_env ("GCPOIDC_AUDIENCE" , config ["GCPOIDC_AUDIENCE" ])
63
- elif sub_test_name == "eks" and "AWS_ACCESS_KEY_ID" in os .environ :
64
- # Store AWS creds for kubectl access.
65
- for key in ["AWS_ACCESS_KEY_ID" , "AWS_SECRET_ACCESS_KEY" , "AWS_SESSION_TOKEN" ]:
66
- if key in os .environ :
67
- write_env (key , os .environ [key ])
68
69
return config
69
70
70
71
You can’t perform that action at this time.
0 commit comments