fix(ci): push to the ashwin/ registry namespace, not the nonexistent nxtgauge org
Some checks failed
build-and-release / build (push) Failing after 18s
Some checks failed
build-and-release / build (push) Failing after 18s
Second failure: pushing to ci.nxtgauge.com/nxtgauge/nxtgauge-ai-assistant 404'd because no "nxtgauge" org exists on this Forgejo instance. The image this app actually runs (verified against the live k8s deployment) lives under ci.nxtgauge.com/ashwin/nxtgauge-ai-assistant, and the real GitOps target is apps/nxtgauge-ai-assistant/overlays/prod/release-patch.yaml in ashwin/nxtgauge-gitops (which Flux's image-automation-controller also tracks via its $imagepolicy marker), not base/deployment.yaml. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
32e071ee8b
commit
1a73e6ac04
1 changed files with 14 additions and 11 deletions
|
|
@ -62,33 +62,36 @@ jobs:
|
|||
SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
image_ref="$REGISTRY_HOST/nxtgauge/nxtgauge-ai-assistant:$SHA"
|
||||
|
||||
image_ref="$REGISTRY_HOST/ashwin/nxtgauge-ai-assistant:$SHA"
|
||||
|
||||
docker buildx build --push \
|
||||
-t "$image_ref" \
|
||||
-t "$REGISTRY_HOST/nxtgauge/nxtgauge-ai-assistant:latest" \
|
||||
-t "$REGISTRY_HOST/ashwin/nxtgauge-ai-assistant:latest" \
|
||||
-f Dockerfile \
|
||||
.
|
||||
|
||||
- name: Update GitOps
|
||||
env:
|
||||
GITOPS_REPO: https://ci.nxtgauge.com/nxtgauge/nxtgauge-gitops.git
|
||||
GITOPS_REPO: https://ci.nxtgauge.com/ashwin/nxtgauge-gitops.git
|
||||
GITOPS_TOKEN: ${{ secrets.GITOPS_TOKEN }}
|
||||
SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
apk add --no-cache git
|
||||
|
||||
|
||||
git config --global credential.helper '!f() { printf "%s\\n" "username=forgejo-actions"; printf "%s\\n" "password=$GITOPS_TOKEN"; }; f'
|
||||
|
||||
|
||||
GITOPS_DIR=$(mktemp -d)
|
||||
git clone "$GITOPS_REPO" "$GITOPS_DIR"
|
||||
cd "$GITOPS_DIR"
|
||||
|
||||
# Update deployment image
|
||||
sed -i "s|image: ci.nxtgauge.com/nxtgauge/nxtgauge-ai-assistant:.*|image: ci.nxtgauge.com/nxtgauge/nxtgauge-ai-assistant:$SHA|" apps/nxtgauge-ai-assistant/base/deployment.yaml
|
||||
|
||||
|
||||
# release-patch.yaml carries a Flux $imagepolicy marker comment on
|
||||
# this line - Flux's own image-automation-controller would
|
||||
# eventually rewrite it too, but committing here makes the new
|
||||
# tag live immediately instead of waiting on Flux's poll interval.
|
||||
sed -i -E "s|(image: ci\.nxtgauge\.com/ashwin/nxtgauge-ai-assistant:)[a-f0-9]+|\1$SHA|" apps/nxtgauge-ai-assistant/overlays/prod/release-patch.yaml
|
||||
|
||||
git config user.name "forgejo-actions[bot]"
|
||||
git config user.email "forgejo-actions@ci.nxtgauge.com"
|
||||
git add apps/nxtgauge-ai-assistant/base/deployment.yaml
|
||||
git add apps/nxtgauge-ai-assistant/overlays/prod/release-patch.yaml
|
||||
git diff --quiet || (git commit -m "chore(gitops): deploy ai-assistant@${SHA}" && git push)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue