in agent/src/jetbrains/buildServer/swabra/SwabraSettings.java [49:83]
public SwabraSettings(@NotNull AgentRunningBuild runningBuild, @NotNull AgentOperationModeHolder operationModeHolder) {
final boolean isServiceMode = operationModeHolder.getOperationMode().isRegistrationOnServerSupported();
final Collection<AgentBuildFeature> features = runningBuild.getBuildFeaturesOfType(SwabraUtil.FEATURE_TYPE);
final Map<String, String> params = new HashMap<String, String>();
if (!features.isEmpty()) {
params.putAll(features.iterator().next().getParameters());
}
params.putAll(runningBuild.getSharedConfigParameters());
myCleanupEnabled = isServiceMode && SwabraUtil.isCleanupEnabled(params);
myCleanupMode = SwabraUtil.getCleanupMode(params);
myStrict = SwabraUtil.isStrict(params);
myLockingProcessesKill = SystemInfo.isWindows && SwabraUtil.isLockingProcessesKill(params);
myLockingProcessesReport = SystemInfo.isWindows && SwabraUtil.isLockingProcessesReport(params);
myVerbose = SwabraUtil.isVerbose(params);
myCheckoutDir = runningBuild.getCheckoutDirectory();
if (!isServiceMode && SwabraUtil.isCleanupEnabled(params)){
runningBuild.getBuildLogger().debug("Swabra is functional only when running on local and cloud profile-based agents.");
}
final List<String> rules = new ArrayList<String>();
rules.addAll(SwabraUtil.splitRules(SwabraUtil.getRules(params)));
if (params.containsKey(DEFAULT_RULES_CONFIG_PARAM)) {
rules.addAll(SwabraUtil.splitRules(params.get(DEFAULT_RULES_CONFIG_PARAM)));
} else if (AgentCheckoutMode.ON_AGENT == runningBuild.getEffectiveCheckoutMode()) {
rules.addAll(Arrays.asList(DEFAULT_RULES));
}
myRules = new SwabraRules(myCheckoutDir, rules);
myIgnoredProcesses = getIgnoredProcesses(params.get(IGNORED_PPRCESSES_CONFIG_PARAM));
logSettings();
}