fix: replace embedded python with sed in deploy-gke manifest update step
Neuron Soul CI / build (push) Successful in 7m6s
Deploy Soul to GKE / deploy (push) Failing after 8m11s

This commit is contained in:
2026-06-19 15:25:22 -05:00
parent 6f4adf7640
commit 996dd3860a
+4 -17
View File
@@ -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"