Add ci/cd and fix multiple pods issues
This commit is contained in:
31
infrastructure/ci-cd/tekton/tasks/git-clone.yaml
Normal file
31
infrastructure/ci-cd/tekton/tasks/git-clone.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
# Tekton Git Clone Task for Bakery-IA CI/CD
|
||||
# This task clones the source code repository
|
||||
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: git-clone
|
||||
namespace: tekton-pipelines
|
||||
spec:
|
||||
workspaces:
|
||||
- name: output
|
||||
params:
|
||||
- name: url
|
||||
type: string
|
||||
description: Repository URL to clone
|
||||
- name: revision
|
||||
type: string
|
||||
description: Git revision to checkout
|
||||
default: "main"
|
||||
steps:
|
||||
- name: clone
|
||||
image: alpine/git
|
||||
script: |
|
||||
#!/bin/sh
|
||||
set -e
|
||||
echo "Cloning repository: $(params.url)"
|
||||
git clone $(params.url) $(workspaces.output.path)
|
||||
cd $(workspaces.output.path)
|
||||
echo "Checking out revision: $(params.revision)"
|
||||
git checkout $(params.revision)
|
||||
echo "Repository cloned successfully"
|
||||
Reference in New Issue
Block a user