# Main CI Pipeline for Bakery-IA # This pipeline orchestrates the build, test, and deploy process apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: name: bakery-ia-ci namespace: tekton-pipelines spec: workspaces: - name: shared-workspace - name: docker-credentials params: - name: git-url type: string description: Repository URL - name: git-revision type: string description: Git revision/commit hash - name: registry type: string description: Container registry URL default: "gitea.bakery-ia.local:5000" tasks: - name: fetch-source taskRef: name: git-clone workspaces: - name: output workspace: shared-workspace params: - name: url value: $(params.git-url) - name: revision value: $(params.git-revision) - name: detect-changes runAfter: [fetch-source] taskRef: name: detect-changed-services workspaces: - name: source workspace: shared-workspace - name: build-and-push runAfter: [detect-changes] taskRef: name: kaniko-build when: - input: "$(tasks.detect-changes.results.changed-services)" operator: notin values: ["none"] workspaces: - name: source workspace: shared-workspace - name: docker-credentials workspace: docker-credentials params: - name: services value: $(tasks.detect-changes.results.changed-services) - name: registry value: $(params.registry) - name: git-revision value: $(params.git-revision) - name: update-gitops-manifests runAfter: [build-and-push] taskRef: name: update-gitops when: - input: "$(tasks.detect-changes.results.changed-services)" operator: notin values: ["none"] workspaces: - name: source workspace: shared-workspace params: - name: services value: $(tasks.detect-changes.results.changed-services) - name: registry value: $(params.registry) - name: git-revision value: $(params.git-revision)