Modify sonarqube frontend plugin to handle multiple sonarqube instances

The instance name should be provided into the annotation in the `catalog-info.yaml`

Care has been taken to provide backward compatibility of previous annotation into the default sonarqube instance

Signed-off-by: Neemys <36508659+Neemys@users.noreply.github.com>
This commit is contained in:
Neemys
2022-06-17 17:43:40 +02:00
parent 619b515172
commit f9c310a439
9 changed files with 139 additions and 42 deletions
@@ -38,6 +38,14 @@ export async function createRouter(
measures: [{ metric: 'coverage', value: '50' }],
});
});
router.get('/instanceUrl', (request, response) => {
logger.info(request.params);
response.send({
instanceUrl: `https://instance.local?${encodeURI(
request.query.instanceKey as string,
)}`,
});
});
router.use(errorHandler());
return router;
}