From 24db52bd49fa19f71d345620afb83ffab7c9df52 Mon Sep 17 00:00:00 2001 From: "Benjamin P. Jung" Date: Tue, 3 Oct 2017 17:45:12 +0200 Subject: [PATCH] Add more metadata. --- assets/in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/in b/assets/in index ec0d457..560f891 100755 --- a/assets/in +++ b/assets/in @@ -64,11 +64,12 @@ fi project_status="./qualitygate_project_status.json" sq_qualitygates_project_status "${sonar_login}:${sonar_password}" "${sonar_host_url}" "${analysis_id}" > "${project_status}" -# TODO Parse contents of project_status and popuplate metadata. +project_status=$(jq -r '.projectStatus.status // ""' < "${project_status}") jq -n "{ version: { ce_task_id: \"${ce_task_id}\"}, metadata: [ - { name: \"ce_task_status\", value: \"${ce_task_status}\" } + { name: \"ce_task_status\", value: \"${ce_task_status}\" }, + { name: \"project_status\", value: \"${project_status}\" } ] }" >&3 \ No newline at end of file