update
This commit is contained in:
@@ -146,8 +146,16 @@ def build_and_push(
|
|||||||
print(f"Running Kaniko: {' '.join(kaniko_cmd)}")
|
print(f"Running Kaniko: {' '.join(kaniko_cmd)}")
|
||||||
result = subprocess.run(kaniko_cmd, capture_output=True, text=True)
|
result = subprocess.run(kaniko_cmd, capture_output=True, text=True)
|
||||||
|
|
||||||
auth_token = subprocess.run("aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/i9a4e3f6",
|
auth_token = subprocess.run(
|
||||||
capture_output=True, text=True)
|
"aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws",
|
||||||
|
shell=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True
|
||||||
|
)
|
||||||
|
|
||||||
|
print(auth_token.stdout)
|
||||||
|
if auth_token.returncode != 0:
|
||||||
|
raise RuntimeError(f"ECR authentication failed:\n{auth_token.stderr}")
|
||||||
|
|
||||||
print(result.stdout)
|
print(result.stdout)
|
||||||
if result.returncode != 0:
|
if result.returncode != 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user