chore: remove gitops update step (handled server-side)
This commit is contained in:
parent
37b17b8b77
commit
2a65d79aea
1 changed files with 0 additions and 35 deletions
|
|
@ -52,41 +52,6 @@ steps:
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: update-gitops
|
|
||||||
image: alpine/git:latest
|
|
||||||
environment:
|
|
||||||
GHCR_TOKEN:
|
|
||||||
from_secret: GHCR_TOKEN
|
|
||||||
GHCR_USERNAME:
|
|
||||||
from_secret: GHCR_USERNAME
|
|
||||||
GITOPS_REPO_URL:
|
|
||||||
from_secret: GITOPS_REPO_URL
|
|
||||||
commands:
|
|
||||||
- |
|
|
||||||
set -e
|
|
||||||
echo "Updating GitOps for ${SERVICE}"
|
|
||||||
git clone https://${GHCR_USERNAME}:${GHCR_TOKEN}@${GITOPS_REPO_URL} /tmp/gitops
|
|
||||||
cd /tmp/gitops
|
|
||||||
git checkout main
|
|
||||||
BACKEND_OVERLAY="apps/nxtgauge-backend-rust/overlays/prod"
|
|
||||||
if [ -f "${BACKEND_OVERLAY}/kustomization.yaml" ]; then
|
|
||||||
sed -i "s|image: registry.nxtgauge.com:5000/nxtgauge-rust-${SERVICE}:.*|image: registry.nxtgauge.com:5000/nxtgauge-rust-${SERVICE}:${CI_COMMIT_SHA}|" \
|
|
||||||
${BACKEND_OVERLAY}/kustomization.yaml
|
|
||||||
echo "Updated ${SERVICE} in ${BACKEND_OVERLAY}/kustomization.yaml"
|
|
||||||
fi
|
|
||||||
if ! git diff --quiet; then
|
|
||||||
git config user.name "Woodpecker CI"
|
|
||||||
git config user.email "woodpecker@nxtgauge.com"
|
|
||||||
git add -A
|
|
||||||
git commit -m "ci: update ${SERVICE} to ${CI_COMMIT_SHA:0:8}"
|
|
||||||
git push origin main
|
|
||||||
echo "Pushed GitOps update"
|
|
||||||
else
|
|
||||||
echo "No changes to push"
|
|
||||||
fi
|
|
||||||
when:
|
|
||||||
status: success
|
|
||||||
|
|
||||||
---
|
---
|
||||||
when:
|
when:
|
||||||
branch: [main, high-performance]
|
branch: [main, high-performance]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue