本文整理汇总了Java中jenkins.model.GlobalConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java GlobalConfiguration类的具体用法?Java GlobalConfiguration怎么用?Java GlobalConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GlobalConfiguration类属于jenkins.model包,在下文中一共展示了GlobalConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
MockitoAnnotations.initMocks(this);
jobConfigData = new JobConfigData();
jobExecutionService = new JobExecutionService();
globalConfigDataForSonarInstance = new GlobalConfigDataForSonarInstance();
publisher = new QGPublisher(jobConfigData, buildDecision, jobExecutionService, jobConfigurationService, globalConfigDataForSonarInstance);
builder = new QGBuilder(jobConfigData, buildDecision, jobExecutionService, jobConfigurationService, globalConfigDataForSonarInstance);
globalConfig = GlobalConfiguration.all().get(GlobalConfig.class);
freeStyleProject = jenkinsRule.createFreeStyleProject("freeStyleProject");
freeStyleProject.getBuildersList().add(builder);
freeStyleProject.getPublishersList().add(publisher);
globalConfigDataForSonarInstanceList = new ArrayList<>();
}
示例2: setUp
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Before
public void setUp() throws IOException {
MockitoAnnotations.initMocks(this);
jobConfigData = new JobConfigData();
jobConfigurationService = new JobConfigurationService();
jobExecutionService = new JobExecutionService();
globalConfigDataForSonarInstance = new GlobalConfigDataForSonarInstance();
builderDescriptor = new QGBuilderDescriptor(jobExecutionService, jobConfigurationService);
qgBuilder = new QGBuilder(jobConfigData, buildDecision, jobExecutionService, jobConfigurationService, globalConfigDataForSonarInstance);
globalConfig = GlobalConfiguration.all().get(GlobalConfig.class);
freeStyleProject = jenkinsRule.createFreeStyleProject("freeStyleProject");
freeStyleProject.getBuildersList().add(qgBuilder);
globalConfigDataForSonarInstanceList = new ArrayList<>();
}
示例3: testInvalidConfiguredSlackToken
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Test
public void testInvalidConfiguredSlackToken() throws Exception {
GlobalConfig config = GlobalConfiguration.all().get(GlobalConfig.class);
assertThat(config.getSlackOutgoingWebhookToken(), is(nullValue()));
setConfigSettings();
List<NameValuePair> badData = new ArrayList<NameValuePair>();
badData.add(new NameValuePair("token", "BAD_TOKEN"));
WebResponse response = makeRequest(badData);
assertThat(getSlackMessage(response).getText(), is("Invalid Slack token"));
}
示例4: setSolrBackend
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public void setSolrBackend(boolean useSecurity, int port) throws IOException, URISyntaxException {
SearchBackendConfiguration searchBackendConfiguration = GlobalConfiguration.all().get(
SearchBackendConfiguration.class);
searchBackendConfiguration.setUseSecurity(useSecurity);
searchBackendConfiguration.setSearchBackend(SearchBackendEngine.SOLR);
searchBackendConfiguration.setSolrCollection("collection1");
searchBackendConfiguration.setSolrUrl(searchBackendConfiguration.makeSolrUrl("http://127.0.0.1:" + port));
searchBackendConfiguration.reconfigure();
}
示例5: setLuceneBackend
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public void setLuceneBackend(boolean useSecurity) throws IOException, URISyntaxException, SAXException {
SearchBackendConfiguration searchBackendConfiguration = GlobalConfiguration.all().get(
SearchBackendConfiguration.class);
searchBackendConfiguration.setUseSecurity(useSecurity);
searchBackendConfiguration.setSearchBackend(SearchBackendEngine.LUCENE);
searchBackendConfiguration.reconfigure();
}
示例6: get
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static GlobalPluginConfiguration get() {
return GlobalConfiguration.all().get(GlobalPluginConfiguration.class);
}
示例7: isEnabled
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Override
public boolean isEnabled() {
return GlobalConfiguration.all().get(PluginGlobalConfig.class).getEnabled() &&
HudsonSecurityRealmRegistration.isActive();
}
示例8: getGlobalConfig
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Override
public PluginGlobalConfig getGlobalConfig() {
return GlobalConfiguration.all().get(PluginGlobalConfig.class);
}
示例9: get
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static DockerPublishConfiguration get() {
return GlobalConfiguration.all().get(DockerPublishConfiguration.class);
}
示例10: get
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Nullable
public static GlobalPipelineMavenConfig get() {
return GlobalConfiguration.all().get(GlobalPipelineMavenConfig.class);
}
示例11: WebhookEndpoint
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public WebhookEndpoint() {
globalConfig = GlobalConfiguration.all().get(GlobalConfig.class);
}
示例12: get
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static HipchatConfig get() {
return GlobalConfiguration.all().get(HipchatConfig.class);
}
示例13: get
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static SetupConfig get() {
return GlobalConfiguration.all().get(SetupConfig.class);
}
示例14: get
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static JobProfilesConfiguration get() {
return GlobalConfiguration.all().get(JobProfilesConfiguration.class);
}
示例15: get
import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
/**
* @return the Jenkins managed singleton for the configuration object
*/
public static Configuration get() {
return GlobalConfiguration.all().get(Configuration.class);
}