import org.sonar.ce.db.ReadOnlyPropertiesDao;
import org.sonar.ce.es.EsIndexerEnabler;
import org.sonar.ce.platform.ComputeEngineExtensionInstaller;
-import org.sonar.ce.property.CePropertyDefinitions;
import org.sonar.ce.settings.ComputeEngineSettings;
import org.sonar.ce.user.CeUserSession;
import org.sonar.core.component.DefaultResourceTypes;
.add(props.rawProperties())
.add(level1Components())
.add(toArray(CorePropertyDefinitions.all()))
- .add(toArray(CePropertyDefinitions.all()))
.add(toArray(ClusterProperties.definitions()));
configureFromModules(this.level1);
this.level1.startComponents();
);
assertThat(picoContainer.getParent().getParent().getParent().getComponentAdapters()).hasSize(
COMPONENTS_IN_LEVEL_1_AT_CONSTRUCTION
- + 26 // level 1
+ + 25 // level 1
+ 48 // content of DaoModule
+ 2 // content of EsSearchModule
+ 54 // content of CorePropertyDefinitions
static final String MDC_CE_ACTIVITY_FLAG = "ceActivityFlag";
static final String MDC_CE_TASK_UUID = "ceTaskUuid";
- public static final String MAX_LOGS_PROPERTY = "sonar.ce.maxLogsPerTask";
public void initForTask(CeTask task) {
MDC.put(MDC_CE_TASK_UUID, task.getUuid());
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.ce.property;
-
-import java.util.List;
-import org.sonar.api.CoreProperties;
-import org.sonar.api.PropertyType;
-import org.sonar.api.config.PropertyDefinition;
-import org.sonar.ce.log.CeLogging;
-
-import static java.util.Arrays.asList;
-
-public class CePropertyDefinitions {
- private CePropertyDefinitions() {
- // only statics
- }
-
- public static List<PropertyDefinition> all() {
- return asList(
- PropertyDefinition.builder(CeLogging.MAX_LOGS_PROPERTY)
- .name("Compute Engine Log Retention")
- .description("Number of tasks to keep logs for a given project. Once the number of logs exceeds this limit, oldest logs are purged.")
- .type(PropertyType.INTEGER)
- .defaultValue("10")
- .category(CoreProperties.CATEGORY_GENERAL)
- .build());
- }
-}
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.ce.property;
-
-import javax.annotation.ParametersAreNonnullByDefault;
import org.sonar.api.utils.System2;
import org.sonar.api.utils.Version;
import org.sonar.api.utils.internal.TempFolderCleaner;
-import org.sonar.ce.property.CePropertyDefinitions;
import org.sonar.core.config.CorePropertyDefinitions;
import org.sonar.core.util.UuidFactoryImpl;
import org.sonar.db.DaoModule;
// Classes kept for backward compatibility of plugins/libs (like sonar-license) that are directly calling classes from the core
org.sonar.core.properties.PropertiesDao.class);
addAll(CorePropertyDefinitions.all());
- addAll(CePropertyDefinitions.all());
// cluster
addAll(ClusterProperties.definitions());
+++ /dev/null
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.ce.property;
-
-import org.junit.Test;
-import org.sonar.test.TestUtils;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class CePropertyDefinitionsTest {
-
- @Test
- public void all() {
- assertThat(CePropertyDefinitions.all()).isNotEmpty();
- }
-
- @Test
- public void only_statics() {
- assertThat(TestUtils.hasOnlyPrivateConstructors(CePropertyDefinitions.class)).isTrue();
- }
-}