grafana/toolkit: Smaller output after successful upload (#20580)

After toolkit uploads a report successfully, it should only show the 
response data, not the whole request info.
This commit is contained in:
Ryan McKinley 2019-11-22 02:38:14 -07:00 committed by Marcus Efraimsson
parent f78b3b1329
commit d9abf01ce1

View File

@ -348,9 +348,13 @@ const pluginReportRunner: TaskRunner<PluginCIOptions> = async ({ upload }) => {
console.log('Sending report to:', url);
const axios = require('axios');
const info = await axios.post(url, report, {
headers: { Authorization: 'bearer ' + GRAFANA_API_KEY },
headers: { Authorization: 'Bearer ' + GRAFANA_API_KEY },
});
console.log('RESULT: ', info);
if (info.status === 200) {
console.log('OK: ', info.data);
} else {
console.warn('Error: ', info);
}
};
export const ciPluginReportTask = new Task<PluginCIOptions>('Generate Plugin Report', pluginReportRunner);