Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Groovy script to get names of all steps in a configuration #3328

robinshen ADMIN ·
groovy:
import com.pmease.quickbuild.stepsupport.CompositeStep;

def buildConfigPath = "root/path/to/your/configuration";

def buildConfiguration = system.getConfiguration( buildConfigPath );
def referencedSteps = [];
def masterStep = buildConfiguration.findStep("master");

referencedSteps.add(masterStep);
fillReferencedSteps(masterStep, buildConfiguration, referencedSteps);

def fillReferencedSteps(step, buildConfiguration, referencedSteps)
{
    if (step instanceof CompositeStep)
    {
        CompositeStep compositeStep = (CompositeStep) step;
        for (each in compositeStep.getChildStepNames())
        {
            def childStep = buildConfiguration.findStep(each);
            if (childStep != null && !referencedSteps.contains(childStep))
            {
                referencedSteps.add(childStep);
                fillReferencedSteps(childStep, buildConfiguration, referencedSteps);
            }
        }
    }
}
  • replies 0
  • views 5224
  • stars 0