From 996dd3860a1710f418d2aa669fe34cdeb9827168 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Fri, 19 Jun 2026 15:25:22 -0500 Subject: [PATCH] fix: replace embedded python with sed in deploy-gke manifest update step --- .gitea/workflows/deploy-gke.yaml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/deploy-gke.yaml b/.gitea/workflows/deploy-gke.yaml index 0f78881..10755b2 100644 --- a/.gitea/workflows/deploy-gke.yaml +++ b/.gitea/workflows/deploy-gke.yaml @@ -214,23 +214,10 @@ jobs: cd /tmp/infra-update DEPLOY_DIR="platform/k8s/neuron-mcp" - python3 -c " -import re, sys - -slot = sys.argv[1] -idle = sys.argv[2] - -def set_replicas(path, count): - with open(path) as f: - content = f.read() - content = re.sub(r'^( replicas: )\d+', r'\g<1>' + str(count), content, count=1, flags=re.MULTILINE) - with open(path, 'w') as f: - f.write(content) - print(f' {path}: replicas set to {count}') - -set_replicas(f'{DEPLOY_DIR}/deployment-{slot}.yaml', 1) -set_replicas(f'{DEPLOY_DIR}/deployment-{idle}.yaml', 0) -" "$SLOT" "$IDLE" + sed -i "s/^ replicas: .*/ replicas: 1/" "${DEPLOY_DIR}/deployment-${SLOT}.yaml" + sed -i "s/^ replicas: .*/ replicas: 0/" "${DEPLOY_DIR}/deployment-${IDLE}.yaml" + echo " deployment-${SLOT}.yaml: replicas set to 1" + echo " deployment-${IDLE}.yaml: replicas set to 0" git config user.email "ci@neurontechnologies.ai" git config user.name "Neuron CI"