Skip to content

Commit acdc734

Browse files
nupurg-ibmNupur Goyal
and
Nupur Goyal
authored
Updating test cases, tekton and config json files (#170)
* Updating test cases and config json files * removing log files * removing log files * updating test cases * fixing pre-commit issues --------- Co-authored-by: Nupur Goyal <[email protected]>
1 parent bd09a34 commit acdc734

40 files changed

+2504
-1190
lines changed

.tekton/git-pr-status/listener-git-pr-status.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ spec:
8585
- name: us_south_reservation_id
8686
description: Ensure that you have received the reservation ID from IBM technical sales. Reservation ID is a unique identifier to distinguish different IBM Cloud HPC service agreements. It must start with a letter and can only contain letters, numbers, hyphens (-), or underscores (_).
8787
default: ""
88+
- name: cos_region
89+
description: The cos region name.
90+
default: ""
91+
- name: cos_bucket
92+
description: The cos bucket name.
93+
default: ""
94+
- name: cos_instance_crn
95+
description: The cos instance crn.
96+
default: ""
8897
resourcetemplates:
8998
- apiVersion: v1
9099
kind: PersistentVolumeClaim
@@ -159,6 +168,12 @@ spec:
159168
value: $(params.us_south_cluster_id)
160169
- name: us_south_reservation_id
161170
value: $(params.us_south_reservation_id)
171+
- name: cos_region
172+
value: $(params.cos_region)
173+
- name: cos_bucket
174+
value: $(params.cos_bucket)
175+
- name: cos_instance_crn
176+
value: $(params.cos_instance_crn)
162177
workspaces:
163178
- name: pipeline-ws
164179
persistentVolumeClaim:

.tekton/git-pr-status/pipeline-git-pr-status.yaml

+29-110
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ spec:
6363
- name: reservation_id
6464
description: Ensure that you have received the reservation ID from IBM technical sales. Reservation ID is a unique identifier to distinguish different IBM Cloud HPC service agreements. It must start with a letter and can only contain letters, numbers, hyphens (-), or underscores (_).
6565
default: ""
66+
- name: cos_region
67+
description: The cos region name.
68+
default: ""
69+
- name: cos_bucket
70+
description: The cos bucket name.
71+
default: ""
72+
- name: cos_instance_crn
73+
description: The cos instance crn.
74+
default: ""
6675
workspaces:
6776
- name: pipeline-ws
6877
tasks:
@@ -193,6 +202,12 @@ spec:
193202
value: $(params.reservation_id)
194203
- name: pr-revision
195204
value: $(params.pr-revision)
205+
- name: cos_region
206+
value: $(params.cos_region)
207+
- name: cos_bucket
208+
value: $(params.cos_bucket)
209+
- name: cos_instance_crn
210+
value: $(params.cos_instance_crn)
196211
- name: wes-hpc-da-ubuntu-pr
197212
runAfter: [git-clone, pre-requisites-install, ssh-key-creation]
198213
taskRef:
@@ -227,6 +242,12 @@ spec:
227242
value: $(params.reservation_id)
228243
- name: pr-revision
229244
value: $(params.pr-revision)
245+
- name: cos_region
246+
value: $(params.cos_region)
247+
- name: cos_bucket
248+
value: $(params.cos_bucket)
249+
- name: cos_instance_crn
250+
value: $(params.cos_instance_crn)
230251
- name: ssh-key-deletion
231252
runAfter: [wes-hpc-da-rhel-pr, wes-hpc-da-ubuntu-pr]
232253
taskRef:
@@ -239,62 +260,6 @@ spec:
239260
value: $(params.pipeline-debug)
240261
- name: pr-revision
241262
value: $(params.pr-revision)
242-
- name: display-test-run-pr-output-log
243-
runAfter: [git-clone, set-git-pr-running, wes-hpc-da-rhel-pr, wes-hpc-da-ubuntu-pr]
244-
workspaces:
245-
- name: workspace
246-
workspace: pipeline-ws
247-
taskSpec:
248-
workspaces:
249-
- name: workspace
250-
description: The git repo will be cloned onto the volume backing this workspace
251-
mountPath: /artifacts
252-
steps:
253-
- name: test-run-output-pr-log-rhel-ubuntu
254-
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
255-
workingDir: "/artifacts"
256-
command: ["/bin/bash", "-c"]
257-
args:
258-
- |
259-
#!/bin/bash
260-
DIRECTORY="/artifacts/tests"
261-
if [ -d "$DIRECTORY" ]; then
262-
echo "*******************************************************"
263-
count=`ls -1 $DIRECTORY/test_output/log* 2>/dev/null | wc -l`
264-
if [ $count == 0 ]; then
265-
echo "Test Suite have not initated and log file not created, check with packages or binaries installation"
266-
exit 1
267-
else
268-
cat $DIRECTORY/test_output/log*
269-
fi
270-
echo "*******************************************************"
271-
else
272-
echo "$DIRECTORY does not exits"
273-
exit 1
274-
fi
275-
- name: test-run-output-pr-log-rhel-ubuntu-error-check
276-
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
277-
workingDir: "/artifacts"
278-
command: ["/bin/bash", "-c"]
279-
args:
280-
- |
281-
#!/bin/bash
282-
DIRECTORY="/artifacts/tests"
283-
if [ -d "$DIRECTORY" ]; then
284-
echo "*******************************************************"
285-
if [ -d "$DIRECTORY" ]; then
286-
# Check any error message in the test run output log
287-
error_check=$(eval "grep -E -w 'FAIL|Error|ERROR' $DIRECTORY/test_output/log*")
288-
if [[ "$error_check" ]]; then
289-
echo "$error_check"
290-
echo "Found Error/FAIL/ERROR in the test run output log. Please check log."
291-
fi
292-
fi
293-
echo "*******************************************************"
294-
else
295-
echo "$DIRECTORY does not exits"
296-
exit 1
297-
fi
298263
- name: inspect-wes-hpc-infra-log
299264
runAfter: [git-clone, set-git-pr-running, wes-hpc-da-rhel-pr, wes-hpc-da-ubuntu-pr]
300265
workspaces:
@@ -306,73 +271,27 @@ spec:
306271
description: The git repo will be cloned onto the volume backing this workspace
307272
mountPath: /artifacts
308273
steps:
309-
- name: inspect-infra-error-rhel-pr
274+
- name: error-check-on-pr-rhel-log
310275
onError: continue
311276
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
312277
workingDir: "/artifacts"
313278
command: ["/bin/bash", "-c"]
314279
args:
315280
- |
316281
#!/bin/bash
317-
LOG_FILE="pipeline-testrunbasic-rhel*"
318-
DIRECTORY="/artifacts/tests"
319-
if [ -d "$DIRECTORY" ]; then
320-
# Check any error message on the plan/apply log
321-
error_check=$(eval "grep -E -w 'FAIL|Error|ERROR' $DIRECTORY/$LOG_FILE")
322-
if [[ "$error_check" ]]; then
323-
echo "$error_check"
324-
echo "Found Error/FAIL/ERROR in plan/apply log. Please check log."
325-
exit 1
326-
else
327-
count=`ls -1 $DIRECTORY/test_output/log* 2>/dev/null | wc -l`
328-
if [ $count == 0 ]; then
329-
echo "Test Suite have not initated and log file not created, check with packages or binaries installation"
330-
exit 1
331-
fi
332-
fi
333-
else
334-
echo "$DIRECTORY does not exits"
335-
exit 1
336-
fi
337-
338-
count=`ls -1 $DIRECTORY/*.cicd 2>/dev/null | wc -l`
339-
if [ $count == 0 ]; then
340-
echo "Test Suite have not initated, check with packages or binaries installations"
341-
exit 1
342-
fi
343-
- name: inspect-infra-error-ubuntu-pr
282+
LOG_FILE="pipeline-pr-rhel*"
283+
source .tekton/scripts/issue_track.sh
284+
issue_track "${LOG_FILE}" "PR"
285+
- name: error-check-on-pr-ubuntu-log
344286
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
345287
workingDir: "/artifacts"
346288
command: ["/bin/bash", "-c"]
347289
args:
348290
- |
349291
#!/bin/bash
350-
LOG_FILE="pipeline-testrunbasic-ubuntu*"
351-
DIRECTORY="/artifacts/tests"
352-
if [ -d "$DIRECTORY" ]; then
353-
# Check any error message on the plan/apply log
354-
error_check=$(eval "grep -E -w 'FAIL|Error|ERROR' $DIRECTORY/$LOG_FILE")
355-
if [[ "$error_check" ]]; then
356-
echo "$error_check"
357-
echo "Found Error/FAIL/ERROR in plan/apply log. Please check log."
358-
exit 1
359-
else
360-
count=`ls -1 $DIRECTORY/test_output/log* 2>/dev/null | wc -l`
361-
if [ $count == 0 ]; then
362-
echo "Test Suite have not initated and log file not created, check with packages or binaries installation"
363-
exit 1
364-
fi
365-
fi
366-
else
367-
echo "$DIRECTORY does not exits"
368-
exit 1
369-
fi
370-
371-
count=`ls -1 $DIRECTORY/*.cicd 2>/dev/null | wc -l`
372-
if [ $count == 0 ]; then
373-
echo "Test Suite have not initated, check with packages or binaries installations"
374-
exit 1
375-
fi
292+
LOG_FILE="pipeline-pr-ubuntu*"
293+
source .tekton/scripts/issue_track.sh
294+
issue_track "${LOG_FILE}" "PR"
376295
finally:
377296
- name: set-git-commit-status
378297
taskRef:

.tekton/git-trigger/listener-git-trigger.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ spec:
9292
- name: us_south_reservation_id
9393
description: Ensure that you have received the reservation ID from IBM technical sales. Reservation ID is a unique identifier to distinguish different IBM Cloud HPC service agreements. It must start with a letter and can only contain letters, numbers, hyphens (-), or underscores (_).
9494
default: ""
95+
- name: cos_region
96+
description: The cos region name.
97+
default: ""
98+
- name: cos_bucket
99+
description: The cos bucket name.
100+
default: ""
101+
- name: cos_instance_crn
102+
description: The cos instance crn.
103+
default: ""
95104
resourcetemplates:
96105
- apiVersion: v1
97106
kind: PersistentVolumeClaim
@@ -172,6 +181,12 @@ spec:
172181
value: $(params.us_south_cluster_id)
173182
- name: us_south_reservation_id
174183
value: $(params.us_south_reservation_id)
184+
- name: cos_region
185+
value: $(params.cos_region)
186+
- name: cos_bucket
187+
value: $(params.cos_bucket)
188+
- name: cos_instance_crn
189+
value: $(params.cos_instance_crn)
175190
workspaces:
176191
- name: pipeline-ws
177192
persistentVolumeClaim:
@@ -227,6 +242,12 @@ spec:
227242
value: $(params.us_south_cluster_id)
228243
- name: us_south_reservation_id
229244
value: $(params.us_south_reservation_id)
245+
- name: cos_region
246+
value: $(params.cos_region)
247+
- name: cos_bucket
248+
value: $(params.cos_bucket)
249+
- name: cos_instance_crn
250+
value: $(params.cos_instance_crn)
230251
---
231252
apiVersion: tekton.dev/v1beta1
232253
kind: EventListener

0 commit comments

Comments
 (0)