Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .tekton/git-pr-status/listener-git-pr-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ spec:
- name: us_south_reservation_id
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 (_).
default: ""
- name: cos_region
description: The cos region name.
default: ""
- name: cos_bucket
description: The cos bucket name.
default: ""
- name: cos_instance_crn
description: The cos instance crn.
default: ""
resourcetemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
Expand Down Expand Up @@ -159,6 +168,12 @@ spec:
value: $(params.us_south_cluster_id)
- name: us_south_reservation_id
value: $(params.us_south_reservation_id)
- name: cos_region
value: $(params.cos_region)
- name: cos_bucket
value: $(params.cos_bucket)
- name: cos_instance_crn
value: $(params.cos_instance_crn)
workspaces:
- name: pipeline-ws
persistentVolumeClaim:
Expand Down
139 changes: 29 additions & 110 deletions .tekton/git-pr-status/pipeline-git-pr-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ spec:
- name: reservation_id
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 (_).
default: ""
- name: cos_region
description: The cos region name.
default: ""
- name: cos_bucket
description: The cos bucket name.
default: ""
- name: cos_instance_crn
description: The cos instance crn.
default: ""
workspaces:
- name: pipeline-ws
tasks:
Expand Down Expand Up @@ -193,6 +202,12 @@ spec:
value: $(params.reservation_id)
- name: pr-revision
value: $(params.pr-revision)
- name: cos_region
value: $(params.cos_region)
- name: cos_bucket
value: $(params.cos_bucket)
- name: cos_instance_crn
value: $(params.cos_instance_crn)
- name: wes-hpc-da-ubuntu-pr
runAfter: [git-clone, pre-requisites-install, ssh-key-creation]
taskRef:
Expand Down Expand Up @@ -227,6 +242,12 @@ spec:
value: $(params.reservation_id)
- name: pr-revision
value: $(params.pr-revision)
- name: cos_region
value: $(params.cos_region)
- name: cos_bucket
value: $(params.cos_bucket)
- name: cos_instance_crn
value: $(params.cos_instance_crn)
- name: ssh-key-deletion
runAfter: [wes-hpc-da-rhel-pr, wes-hpc-da-ubuntu-pr]
taskRef:
Expand All @@ -239,62 +260,6 @@ spec:
value: $(params.pipeline-debug)
- name: pr-revision
value: $(params.pr-revision)
- name: display-test-run-pr-output-log
runAfter: [git-clone, set-git-pr-running, wes-hpc-da-rhel-pr, wes-hpc-da-ubuntu-pr]
workspaces:
- name: workspace
workspace: pipeline-ws
taskSpec:
workspaces:
- name: workspace
description: The git repo will be cloned onto the volume backing this workspace
mountPath: /artifacts
steps:
- name: test-run-output-pr-log-rhel-ubuntu
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
workingDir: "/artifacts"
command: ["/bin/bash", "-c"]
args:
- |
#!/bin/bash
DIRECTORY="/artifacts/tests"
if [ -d "$DIRECTORY" ]; then
echo "*******************************************************"
count=`ls -1 $DIRECTORY/test_output/log* 2>/dev/null | wc -l`
if [ $count == 0 ]; then
echo "Test Suite have not initated and log file not created, check with packages or binaries installation"
exit 1
else
cat $DIRECTORY/test_output/log*
fi
echo "*******************************************************"
else
echo "$DIRECTORY does not exits"
exit 1
fi
- name: test-run-output-pr-log-rhel-ubuntu-error-check
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
workingDir: "/artifacts"
command: ["/bin/bash", "-c"]
args:
- |
#!/bin/bash
DIRECTORY="/artifacts/tests"
if [ -d "$DIRECTORY" ]; then
echo "*******************************************************"
if [ -d "$DIRECTORY" ]; then
# Check any error message in the test run output log
error_check=$(eval "grep -E -w 'FAIL|Error|ERROR' $DIRECTORY/test_output/log*")
if [[ "$error_check" ]]; then
echo "$error_check"
echo "Found Error/FAIL/ERROR in the test run output log. Please check log."
fi
fi
echo "*******************************************************"
else
echo "$DIRECTORY does not exits"
exit 1
fi
- name: inspect-wes-hpc-infra-log
runAfter: [git-clone, set-git-pr-running, wes-hpc-da-rhel-pr, wes-hpc-da-ubuntu-pr]
workspaces:
Expand All @@ -306,73 +271,27 @@ spec:
description: The git repo will be cloned onto the volume backing this workspace
mountPath: /artifacts
steps:
- name: inspect-infra-error-rhel-pr
- name: error-check-on-pr-rhel-log
onError: continue
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
workingDir: "/artifacts"
command: ["/bin/bash", "-c"]
args:
- |
#!/bin/bash
LOG_FILE="pipeline-testrunbasic-rhel*"
DIRECTORY="/artifacts/tests"
if [ -d "$DIRECTORY" ]; then
# Check any error message on the plan/apply log
error_check=$(eval "grep -E -w 'FAIL|Error|ERROR' $DIRECTORY/$LOG_FILE")
if [[ "$error_check" ]]; then
echo "$error_check"
echo "Found Error/FAIL/ERROR in plan/apply log. Please check log."
exit 1
else
count=`ls -1 $DIRECTORY/test_output/log* 2>/dev/null | wc -l`
if [ $count == 0 ]; then
echo "Test Suite have not initated and log file not created, check with packages or binaries installation"
exit 1
fi
fi
else
echo "$DIRECTORY does not exits"
exit 1
fi

count=`ls -1 $DIRECTORY/*.cicd 2>/dev/null | wc -l`
if [ $count == 0 ]; then
echo "Test Suite have not initated, check with packages or binaries installations"
exit 1
fi
- name: inspect-infra-error-ubuntu-pr
LOG_FILE="pipeline-pr-rhel*"
source .tekton/scripts/issue_track.sh
issue_track "${LOG_FILE}" "PR"
- name: error-check-on-pr-ubuntu-log
image: icr.io/continuous-delivery/pipeline/pipeline-base-ubi:latest
workingDir: "/artifacts"
command: ["/bin/bash", "-c"]
args:
- |
#!/bin/bash
LOG_FILE="pipeline-testrunbasic-ubuntu*"
DIRECTORY="/artifacts/tests"
if [ -d "$DIRECTORY" ]; then
# Check any error message on the plan/apply log
error_check=$(eval "grep -E -w 'FAIL|Error|ERROR' $DIRECTORY/$LOG_FILE")
if [[ "$error_check" ]]; then
echo "$error_check"
echo "Found Error/FAIL/ERROR in plan/apply log. Please check log."
exit 1
else
count=`ls -1 $DIRECTORY/test_output/log* 2>/dev/null | wc -l`
if [ $count == 0 ]; then
echo "Test Suite have not initated and log file not created, check with packages or binaries installation"
exit 1
fi
fi
else
echo "$DIRECTORY does not exits"
exit 1
fi

count=`ls -1 $DIRECTORY/*.cicd 2>/dev/null | wc -l`
if [ $count == 0 ]; then
echo "Test Suite have not initated, check with packages or binaries installations"
exit 1
fi
LOG_FILE="pipeline-pr-ubuntu*"
source .tekton/scripts/issue_track.sh
issue_track "${LOG_FILE}" "PR"
finally:
- name: set-git-commit-status
taskRef:
Expand Down
21 changes: 21 additions & 0 deletions .tekton/git-trigger/listener-git-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ spec:
- name: us_south_reservation_id
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 (_).
default: ""
- name: cos_region
description: The cos region name.
default: ""
- name: cos_bucket
description: The cos bucket name.
default: ""
- name: cos_instance_crn
description: The cos instance crn.
default: ""
resourcetemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
Expand Down Expand Up @@ -172,6 +181,12 @@ spec:
value: $(params.us_south_cluster_id)
- name: us_south_reservation_id
value: $(params.us_south_reservation_id)
- name: cos_region
value: $(params.cos_region)
- name: cos_bucket
value: $(params.cos_bucket)
- name: cos_instance_crn
value: $(params.cos_instance_crn)
workspaces:
- name: pipeline-ws
persistentVolumeClaim:
Expand Down Expand Up @@ -227,6 +242,12 @@ spec:
value: $(params.us_south_cluster_id)
- name: us_south_reservation_id
value: $(params.us_south_reservation_id)
- name: cos_region
value: $(params.cos_region)
- name: cos_bucket
value: $(params.cos_bucket)
- name: cos_instance_crn
value: $(params.cos_instance_crn)
---
apiVersion: tekton.dev/v1beta1
kind: EventListener
Expand Down
Loading