CI: Fix k8s deployment when commit message contains a # or \, add more app dirs to whoops handler

This commit is contained in:
Igor Scheller 2022-03-20 21:54:01 +01:00
parent 7677c09237
commit 4b77290134
2 changed files with 12 additions and 2 deletions

View File

@ -343,7 +343,10 @@ deploy:
- export CI_SETUP_ADMIN_PASSWORD=${CI_SETUP_ADMIN_PASSWORD}
- cp deployment.tpl.yaml deployment.yaml
- for env in ${!CI_*}; do sed -i "s#<${env}>#$(echo "${!env}"|head -n1)#g" deployment.yaml; done
- >-
for env in ${!CI_*}; do
sed -i "s#<${env}>#$( echo "${!env}" | head -n1 | sed -e 's~\\~\\\\~' -e 's~#~\\#~' )#g" deployment.yaml;
done
- echo "Deploying to ${CI_ENVIRONMENT_URL}"
- kubectl apply -f deployment.yaml

View File

@ -52,10 +52,17 @@ class Whoops extends Legacy implements HandlerInterface
*/
protected function getPrettyPageHandler(Throwable $e)
{
/** @var PrettyPageHandler $handler */
$handler = $this->app->make(PrettyPageHandler::class);
$handler->setPageTitle('Just another ' . get_class($e) . ' to fix :(');
$handler->setApplicationPaths([realpath(__DIR__ . '/../..')]);
$handler->setApplicationPaths([
realpath(__DIR__ . '/../..'),
realpath(__DIR__ . '/../../../includes/'),
realpath(__DIR__ . '/../../../db/'),
realpath(__DIR__ . '/../../../tests/'),
realpath(__DIR__ . '/../../../public/'),
]);
$data = $this->getData();
$handler->addDataTable('Application', $data);