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,17 +62,17 @@ jobs:
|
||||||
SHA: ${{ github.sha }}
|
SHA: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
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 \
|
docker buildx build --push \
|
||||||
-t "$image_ref" \
|
-t "$image_ref" \
|
||||||
-t "$REGISTRY_HOST/nxtgauge/nxtgauge-ai-assistant:latest" \
|
-t "$REGISTRY_HOST/ashwin/nxtgauge-ai-assistant:latest" \
|
||||||
-f Dockerfile \
|
-f Dockerfile \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Update GitOps
|
- name: Update GitOps
|
||||||
env:
|
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 }}
|
GITOPS_TOKEN: ${{ secrets.GITOPS_TOKEN }}
|
||||||
SHA: ${{ github.sha }}
|
SHA: ${{ github.sha }}
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -85,10 +85,13 @@ jobs:
|
||||||
git clone "$GITOPS_REPO" "$GITOPS_DIR"
|
git clone "$GITOPS_REPO" "$GITOPS_DIR"
|
||||||
cd "$GITOPS_DIR"
|
cd "$GITOPS_DIR"
|
||||||
|
|
||||||
# Update deployment image
|
# release-patch.yaml carries a Flux $imagepolicy marker comment on
|
||||||
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
|
# 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.name "forgejo-actions[bot]"
|
||||||
git config user.email "forgejo-actions@ci.nxtgauge.com"
|
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)
|
git diff --quiet || (git commit -m "chore(gitops): deploy ai-assistant@${SHA}" && git push)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue