Would be nice if we could disable build steps

(not so much a bug but more a feature request)

It would be nice if there was a mechanism to just enable/disable a build step rather than delete it.

I have a build plan consisting of multiple Http Requests to various CI systems on different platforms.

From time to time one of my CI systems can be down due to hardware issue/upgrade/disk swap etc, and whilst that system is down the harbormaster fails for every build because this one step fails

When I know the machine will be down for sometime, I go in and alter the plan, I’d like to be able to disable the step so I can bring it back online when the machine is back up, but the only option is “Delete Step”

Any chance we could have a “Enable/Disable” build step?

I don’t currently plan to allow you to enable or disable individual build steps.

You may be able to move this step to a separate build plan called “Unreliable Tests”, then use the “Plan Behaviors > Affects Buildable” settings of “If Building” or “Never” to allow the overall build to pass even if the plan fails. Then, execute two builds (“Reliable Tests” and “Unreliable Tests”).

To be honest moving or removing those steps even to some other plan isn’t really worth the effort when likely the machine will come back online in the future (once the lockdown is over and our IT support can get onsite to the machine room to fix the server!)

In case this is of value to others, a simple workable solution is to add a “Disabled” HTTP method, and adjust the execution to exit early successfully.

This lets me “edit” the step changing HTTP GET to HTTP Disabled (which I have to do to a number of build plans)

I’ve added the diff below in case others find it useful.


diff --git a/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php b/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php
index 59866d3..1d9ed51 100644
--- a/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php
+++ b/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php
@@ -59,6 +59,10 @@ final class HarbormasterHTTPRequestBuildStepImplementation

     $method = nonempty(idx($settings, 'method'), 'POST');

+    if ($method == 'Disabled'){
+       return;
+    }
     $future = id(new HTTPSFuture($uri))
@@ -96,7 +100,7 @@ final class HarbormasterHTTPRequestBuildStepImplementation
       'method' => array(
         'name' => pht('HTTP Method'),
         'type' => 'select',
-        'options' => array_fuse(array('POST', 'GET', 'PUT', 'DELETE')),
+        'options' => array_fuse(array('POST', 'GET', 'PUT', 'DELETE','Disabled')),
       'credential' => array(
         'name' => pht('Credentials'),