Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3750833
D785.id1984.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D785.id1984.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D785: Report current configuration state
Attached
Detach File
Event Timeline
Log In to Comment