Skip to content

Commit 9ff00d1

Browse files
committed
feat: add condition for logs fetching SD-1405
1 parent 9bbba6d commit 9ff00d1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

charts/tekton-pipelines/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type: application
66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
88
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9-
version: 2.2.14-dev.11
9+
version: 2.2.14-dev.12
1010

1111
maintainers:
1212
- url: https://www.saritasa.com/

charts/tekton-pipelines/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ saritasa-tekton-pipelines
3131

3232
## `chart.version`
3333

34-
![Version: 2.2.14-dev.11](https://img.shields.io/badge/Version-2.2.14-dev.11-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
34+
![Version: 2.2.14-dev.12](https://img.shields.io/badge/Version-2.2.14-dev.12-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
3535

3636
## Maintainers
3737

charts/tekton-pipelines/templates/common/tasks/slack-notification.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ spec:
8888
if [ -n "$failed_pod_name" ] && [ -n "$failed_step" ]; then
8989
# Fetch logs and save info about the failed task
9090
echo "Fetching logs for failed step: ${failed_step}"
91-
echo "https://tekton-logs-server.ci.svc.cluster.local/logs/ci/${failed_pod_name}/step-${failed_step}"
92-
curl -isk "https://tekton-logs-server.ci.svc.cluster.local/logs/ci/${failed_pod_name}/step-${failed_step}" | tail -c 1982 > $(results.logs.path)
93-
cat $(results.logs.path)
91+
until [ -s "$(results.logs.path)" ]
92+
do
93+
sleep 5
94+
curl -sk "https://tekton-logs-server.ci.svc.cluster.local/logs/ci/${failed_pod_name}/step-${failed_step}" | tail -c 1982 > $(results.logs.path)
95+
done
9496
else
9597
echo 'No failed taskRuns'
9698
fi

0 commit comments

Comments
 (0)