diff --git a/.woodpecker.yml b/.woodpecker.yml index 839ee1e..1c69417 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -20,12 +20,12 @@ steps: commands: - | set -eu - SHORT_SHA=$(echo "$CI_COMMIT_SHA" | cut -c1-7) - git clone "http://winicomw:${GIT_PUSH_TOKEN}@gitea.gitea.svc.cluster.local:3000/winicomw/SREOracleServer.git" /tmp/sre + 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 cd /tmp/sre git config user.name "Woodpecker CI" 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 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