fix(ci): ajusta expansao de variaveis no step update-gitops
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Winícius 2026-11-26 15:14:43 -03:00
parent 394d2c2730
commit f8fcf23b0f

View File

@ -20,12 +20,12 @@ steps:
commands: commands:
- | - |
set -eu set -eu
SHORT_SHA=$(echo "$CI_COMMIT_SHA" | cut -c1-7) SHORT_SHA="${CI_COMMIT_SHA:0:7}"
git clone "http://winicomw:${GIT_PUSH_TOKEN}@gitea.gitea.svc.cluster.local:3000/winicomw/SREOracleServer.git" /tmp/sre git clone "http://winicomw:$${GIT_PUSH_TOKEN}@gitea.gitea.svc.cluster.local:3000/winicomw/SREOracleServer.git" /tmp/sre
cd /tmp/sre cd /tmp/sre
git config user.name "Woodpecker CI" git config user.name "Woodpecker CI"
git config user.email "ci@winicomw.ddnsfree.com" git config user.email "ci@winicomw.ddnsfree.com"
sed -i "s|image: .*maestri-remote-relay:.*|image: registry.registry.svc.cluster.local:5000/maestri-remote-relay:${SHORT_SHA}|g" k8s/maestri-remote.yaml sed -i "s|image: .*maestri-remote-relay:.*|image: registry.registry.svc.cluster.local:5000/maestri-remote-relay:$${SHORT_SHA}|g" k8s/maestri-remote.yaml
git add k8s/maestri-remote.yaml git add k8s/maestri-remote.yaml
git diff --cached --quiet || git commit -m "chore(gitops): atualiza maestri-remote-relay para ${SHORT_SHA}" git diff --cached --quiet || git commit -m "chore(gitops): atualiza maestri-remote-relay para $${SHORT_SHA}"
git push git push