Skip to content

Commit e3d34ab

Browse files
committed
chore: add curl step for experiments SD-1405
1 parent 17d73e3 commit e3d34ab

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
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.4
9+
version: 2.2.14-dev.5
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.4](https://img.shields.io/badge/Version-2.2.14-dev.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
34+
![Version: 2.2.14-dev.5](https://img.shields.io/badge/Version-2.2.14-dev.5-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/kustomize.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ spec:
6262
export newname="${img%%:*}"
6363
export tag="${img##*:}"
6464
65+
test_fail_test
66+
6567
cd $(params.kustomize_overlay_path)
6668
# Use yq to update ECR image tag in kustomization.yaml file
6769
# select the element by name and update the image name and tag

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,24 @@ spec:
5252
pipelinerun_name=$(awk -F= '$1 == "tekton.dev/pipelineRun" {gsub(/"/, "", $2); print $2}' /etc/podinfo/labels)
5353
5454
# Get names of taskRuns from the pipelineRun
55-
taskruns=$(kubectl -n ci get pipelinerun $pipelinerun_name -o json | jq -r '.status.childReferences[]?.name')
56-
57-
sleep 3000
55+
taskruns=$(kubectl -n ci-experiments get pipelinerun $pipelinerun_name -o json | jq -r '.status.childReferences[]?.name')
5856
5957
# Get names of failed pod, task and step from the taskRuns
6058
for taskrun_name in $taskruns; do
61-
kubectl -n ci get taskrun $taskrun_name -o json |
59+
kubectl -n ci-experiments get taskrun $taskrun_name -o json |
6260
jq -r 'select(.status.conditions[0].reason == "Failed") |
6361
{ pod: .status.podName,
6462
task: .metadata.labels["tekton.dev/pipelineTask"],
6563
step: (.status.steps[]? | select(.terminated.reason == "Error" and (.terminationReason != "Skipped")) | .name)}' \
6664
>> $(results.failed_info.path)
6765
done
6866
67+
- name: get-failed-logs
68+
image: {{ .Values.images.curl | default "curlimages/curl:latest"}}
69+
imagePullPolicy: {{ .Values.imagePullPolicy }}
70+
script: |
71+
#!/bin/sh
72+
6973
failed_pod_name=$(cat $(results.failed_info.path) | jq '.pod' -r)
7074
failed_task=$(cat $(results.failed_info.path) | jq '.task' -r)
7175
failed_step=$(cat $(results.failed_info.path) | jq '.step' -r)
@@ -80,6 +84,8 @@ spec:
8084
echo 'No failed taskRuns'
8185
fi
8286
87+
sleep 1000
88+
8389
- name: notification
8490
image: {{ .Values.images.slack | default "cloudposse/slack-notifier:latest"}}
8591
imagePullPolicy: {{ .Values.imagePullPolicy }}

charts/tekton-pipelines/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ images:
3535
sentry_cli: getsentry/sentry-cli:2.46.0 # https://github.com/getsentry/sentry-cli/
3636
# -- yq image
3737
yq: mikefarah/yq:4.47.1 # https://github.com/mikefarah/yq
38+
# -- curl image
39+
curl: curlimages/curl:8.16.0 # https://github.com/curl/curl-container
3840

3941

4042
# ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐

0 commit comments

Comments
 (0)