refactor: use TaskRun directly, drop Pipeline wrapper
CI / CI (pull_request) Successful in 3m13s

Pipeline was a pass-through wrapping one Task — unnecessary indirection.
CI now creates TaskRun directly against the integration-test Task.
This commit is contained in:
Admin Bot
2026-09-14 07:43:35 +09:00
parent f47fecc589
commit 819ea346b9
4 changed files with 13 additions and 46 deletions
+12 -11
View File
@@ -72,30 +72,30 @@ jobs:
RUN_NAME="integration-test-${SHA}"
# Clean up any previous run with the same name
kubectl delete pipelinerun "${RUN_NAME}" -n api --ignore-not-found
kubectl delete taskrun "${RUN_NAME}" -n api --ignore-not-found
# Create PipelineRun — spins up gateway sidecar + curl tests
# Create TaskRun — spins up gateway sidecar + curl tests
cat <<YAML | kubectl create -f -
apiVersion: tekton.dev/v1
kind: PipelineRun
kind: TaskRun
metadata:
name: ${RUN_NAME}
namespace: api
labels:
commit-sha: "${SHA}"
spec:
pipelineRef:
name: integration-test-pipeline
taskRef:
name: integration-test
params:
- name: image
value: "${IMAGE}:${SHA}"
YAML
echo "✓ PipelineRun created: ${RUN_NAME}"
echo "✓ TaskRun created: ${RUN_NAME}"
# Wait for completion (Succeeded or Failed)
echo "Waiting for tests (timeout 5m)..."
if kubectl wait pipelinerun/"${RUN_NAME}" -n api \
if kubectl wait taskrun/"${RUN_NAME}" -n api \
--for=condition=Succeeded --timeout=5m 2>/dev/null; then
echo "result=pass" >> $GITHUB_OUTPUT
else
@@ -105,12 +105,13 @@ jobs:
# Print logs + results
echo ""
echo "=== Test Logs ==="
kubectl logs -n api "pipelinerun/${RUN_NAME}" --all-containers 2>/dev/null || true
POD=$(kubectl get pod -n api -l tekton.dev/taskRun=${RUN_NAME} -o name | head -1)
kubectl logs -n api "${POD}" -c step-run-tests 2>/dev/null || true
echo ""
REASON=$(kubectl get pipelinerun "${RUN_NAME}" -n api \
REASON=$(kubectl get taskrun "${RUN_NAME}" -n api \
-o jsonpath='{.status.conditions[0].reason}')
SUMMARY=$(kubectl get pipelinerun "${RUN_NAME}" -n api \
-o jsonpath='{.status.results[?(@.name=="test-summary")].value}')
SUMMARY=$(kubectl get taskrun "${RUN_NAME}" -n api \
-o jsonpath='{.status.results[?(@.name=="summary")].value}')
echo "Status: ${REASON}"
echo "Summary: ${SUMMARY}"