diff --git a/dp_np.yaml b/dp_np.yaml index b77d145..db76590 100644 --- a/dp_np.yaml +++ b/dp_np.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: tekton-demo - image: harbor.icurfer.com/open/tekton-demo:0.1 + image: harbor.icurfer.com/open/tekton-demo:latest imagePullPolicy: Always ports: - containerPort: 80 diff --git a/sample-build/06-trigger-binding.yaml b/sample-build/06-trigger-binding.yaml index a17f613..cda1c29 100644 --- a/sample-build/06-trigger-binding.yaml +++ b/sample-build/06-trigger-binding.yaml @@ -11,4 +11,4 @@ spec: - name: git-revision value: $(body.ref) - name: commit-sha - value: $(extensions.short_sha) \ No newline at end of file + value: $(body.head_commit.id[0:7]) # ✅ 첫 7자 추출 \ No newline at end of file diff --git a/sample-build/apply.py b/sample-build/apply.py new file mode 100644 index 0000000..f4a6b8b --- /dev/null +++ b/sample-build/apply.py @@ -0,0 +1,15 @@ +#!/usr/bin/python3 + +import os +import sys +import subprocess + +yaml_list = [ + "02-task-build.yaml", + "05-pipeline-build.yaml", + "06-trigger-binding.yaml", + "07-trigger-template.yaml", +] + +for yaml_file in yaml_list: + os.system(f"kubectl apply -f {yaml_file}") diff --git a/sample-build/delete.py b/sample-build/delete.py new file mode 100644 index 0000000..463d8d5 --- /dev/null +++ b/sample-build/delete.py @@ -0,0 +1,15 @@ +#!/usr/bin/python3 + +import os +import sys +import subprocess + +yaml_list = [ + "02-task-build.yaml", + "05-pipeline-build.yaml", + "06-trigger-binding.yaml", + "07-trigger-template.yaml", +] + +for yaml_file in yaml_list: + os.system(f"kubectl delete -f {yaml_file}")