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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user