Page MenuHomeDevCentral

D785.id1984.diff
No OneTemporary

D785.id1984.diff

diff --git a/app/Http/routes.php b/app/Http/routes.php
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -22,6 +22,13 @@
return "ALIVE";
});
+// Allows to external tool to check the current configuration.
+if (Features::isEnabled('GetConfig')) {
+ Route::get('/config', function() {
+ return Response::json(null);
+ });
+}
+
// Gate controllers
if (Features::isEnabled('Gate')) {
foreach (Config::get('gate.controllers') as $controller) {
diff --git a/config/app.php b/config/app.php
--- a/config/app.php
+++ b/config/app.php
@@ -125,6 +125,9 @@
// Enable the API entry point at the /gate URL
'Gate' => true,
+ // Enable the configuration report entry point at the /config URL
+ 'GetConfig' => true,
+
// Send a response to inform the caller of the different actions done.
// If disabled, send an empty 200 response instead.
'ActionsReport' => true,
diff --git a/tests/data/config.json b/tests/data/config.json
new file mode 100644
--- /dev/null
+++ b/tests/data/config.json
@@ -0,0 +1,32 @@
+{
+ "gates": [
+ "DockerHub",
+ "GitHub",
+ "Jenkins",
+ "Phabricator"
+ ],
+ "features": [
+ {
+ "name": "Gate",
+ "enabled": true
+ },
+ {
+ "name": "ActionsReport"
+ "enabled": true
+ }
+ ],
+ "services": [
+ {
+ "gate": "GitHub",
+ "door": "Nasqueron",
+ "instance": "",
+ "status": ""
+ },
+ {
+ "gate": "Phabricator",
+ "door": "Nasqueron",
+ "instance": "https://devcentral.nasqueron.org",
+ "status": ""
+ }
+ ]
+}

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 03:48 (21 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2250212
Default Alt Text
D785.id1984.diff (1 KB)

Event Timeline