Closed fftorres closed 4 years ago
First of all: thanks for the PR and sorry for taking so long to finally have a look at it. I don't really understand what the change of the variable name is all about, though... or am I missing something here?
It's not about a better variable name. Is more about some side effect about mutating the value of project_status
along the script.
I notice that when parse_quality_gates "${quality_gate}" "${project_status}"
runs, the value of project_status
becomes OK
and when project_status=$(jq -r '.projectStatus.status // ""' < "${project_status}")
runs, it fails because was expecting the file name. I suspect the project_status
variable is being mutated in parse_quality_gates
function in common.sh
Mh. I see. Thanks for clarifying things for me.
With the original version I was having the following issue:
I think would be safe to have a readonly variable for project status file. In my tests it fixed my issue.