Fix Use grep instead of find and file to check CRLF in stage-test.sh 57/15757/4
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Sat, 14 Feb 2026 10:11:41 +0000 (11:11 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Sat, 14 Feb 2026 14:41:44 +0000 (15:41 +0100)
Change-Id: Ia718640808d9466f7abf0f5759a6d36a2a3b1f00
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Jenkinsfile.new
devops-stages/stage-test.sh
robot-systest/lib/advanced_cluster_mgmt_lib.resource

index 9e15266..e4d313a 100644 (file)
@@ -35,7 +35,7 @@ pipeline {
     booleanParam(name: 'DO_INSTALL', defaultValue: true, description: '')
     booleanParam(name: 'DO_DOCKERPUSH', defaultValue: true, description: '')
     booleanParam(name: 'DO_ROBOT', defaultValue: true, description: '')
-    
+
     // Module configuration
     string(name: 'MODULE_NAME', defaultValue: 'tests', description: 'Name of the module under test')
     string(name: 'IMAGENAME', defaultValue: 'opensourcemano/tests', description: 'Image name for publish')
index 38993ad..25f2a09 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -47,7 +47,7 @@ check_four_spaces () {
 check_crlf_terminators () {
     folder="$1"
     crlf_terminators="y"
-    ! (find ${folder} -not -type d -exec file "{}" ";" | grep CRLF) && crlf_terminators=""
+    ! grep -r $'\r' ${folder} && crlf_terminators=""
     [ -n "${crlf_terminators}" ] && \
     echo "Some files in ${folder} have CRLF at the end of some lines" && \
     echo "Use this command to change it:" && \
index 563eaa8..562e2f4 100644 (file)
@@ -134,7 +134,7 @@ Check For Cluster Deletion Status
     Log   ${rc},${output}
     ${rc}   ${resourceState}=   Run And Return Rc And Output   osm cluster-show ${cluster_name} -o jsonpath='{.resourceState}'
     Log   ${rc},${resourceState}
-    IF   '$rc' == '$SUCCESS_RETURN_CODE' and '$resourceState' == 'ERROR'
+    IF   "${rc}" == "${SUCCESS_RETURN_CODE}" and "${resourceState}" == "ERROR"
         Fail   Cluster is in error state and will not be deleted.
     ELSE
         Log   Either the cluster ${cluster_name} has been deleted or it is in a valid state.