From 68e07355eb63bb5b0b9d0f1b4797e82b9033f0c5 Mon Sep 17 00:00:00 2001 From: Bakery Admin Date: Fri, 23 Jan 2026 22:14:15 +0100 Subject: [PATCH] Fix issues 10 --- frontend/src/main.tsx | 2 +- .../cicd/tekton-helm/templates/task-update-gitops.yaml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index da941783..9fb801f8 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -7,7 +7,7 @@ import './styles/animations.css'; import './styles/themes/light.css'; import './styles/themes/dark.css'; -// TEst - OpenTelemetry Web SDK initialization +// OpenTelemetry Web SDK initialization import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'; import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'; import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; diff --git a/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml b/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml index 7a8afc83..37073e5e 100644 --- a/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml +++ b/infrastructure/cicd/tekton-helm/templates/task-update-gitops.yaml @@ -86,7 +86,10 @@ spec: cd /tmp/gitops # Switch to target branch - git checkout "$(params.git-branch)" || git checkout -b "$(params.git-branch)" + # The git-branch param may come as "refs/heads/main" from webhook, extract just the branch name + BRANCH_NAME=$(echo "$(params.git-branch)" | sed 's|refs/heads/||') + echo "Target branch: $BRANCH_NAME" + git checkout "$BRANCH_NAME" || git checkout -b "$BRANCH_NAME" # Compute short hash once for job name updates SHORT_HASH=$(echo "$(params.git-revision)" | cut -c 1-8) @@ -184,7 +187,8 @@ spec: git status if ! git diff --cached --quiet; then git commit -m "Update images for services: $(params.services) [skip ci]" - git push origin "$(params.git-branch)" + echo "Pushing to branch: $BRANCH_NAME" + git push origin "HEAD:$BRANCH_NAME" echo "GitOps manifests updated successfully" else echo "No changes to commit"