当前位置: 首页>>代码示例>>Java>>正文


Java GlobalConfiguration类代码示例

本文整理汇总了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<>();
}
 
开发者ID:jenkinsci,项目名称:sonar-quality-gates-plugin,代码行数:15,代码来源:QGPublisherIT.java

示例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<>();
}
 
开发者ID:jenkinsci,项目名称:sonar-quality-gates-plugin,代码行数:15,代码来源:QGBuilderIT.java

示例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"));
}
 
开发者ID:dpires,项目名称:jenkins-slack-webhook-plugin,代码行数:15,代码来源:WebhookEndpointTest.java

示例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();
}
 
开发者ID:jenkinsci,项目名称:lucene-search-plugin,代码行数:10,代码来源:JenkinsSearchBackend.java

示例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();
}
 
开发者ID:jenkinsci,项目名称:lucene-search-plugin,代码行数:8,代码来源:JenkinsSearchBackend.java

示例6: get

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static GlobalPluginConfiguration get() {
	return GlobalConfiguration.all().get(GlobalPluginConfiguration.class);
}
 
开发者ID:jenkinsci,项目名称:openshift-sync-plugin,代码行数:4,代码来源:GlobalPluginConfiguration.java

示例7: isEnabled

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Override
public boolean isEnabled() {
    return GlobalConfiguration.all().get(PluginGlobalConfig.class).getEnabled() &&
            HudsonSecurityRealmRegistration.isActive();
}
 
开发者ID:inFullMobile,项目名称:restricted-register-plugin,代码行数:6,代码来源:RRHudsonUserProperty.java

示例8: getGlobalConfig

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Override
public PluginGlobalConfig getGlobalConfig() {
    return GlobalConfiguration.all().get(PluginGlobalConfig.class);
}
 
开发者ID:inFullMobile,项目名称:restricted-register-plugin,代码行数:5,代码来源:PluginDescriptorImpl.java

示例9: get

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static DockerPublishConfiguration get() {
    return GlobalConfiguration.all().get(DockerPublishConfiguration.class);
}
 
开发者ID:DotCi,项目名称:DotCi-DockerPublish,代码行数:4,代码来源:DockerPublishConfiguration.java

示例10: get

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
@Nullable
public static GlobalPipelineMavenConfig get() {
    return GlobalConfiguration.all().get(GlobalPipelineMavenConfig.class);
}
 
开发者ID:jenkinsci,项目名称:pipeline-maven-plugin,代码行数:5,代码来源:GlobalPipelineMavenConfig.java

示例11: WebhookEndpoint

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public WebhookEndpoint() {
    globalConfig = GlobalConfiguration.all().get(GlobalConfig.class);
}
 
开发者ID:dpires,项目名称:jenkins-slack-webhook-plugin,代码行数:4,代码来源:WebhookEndpoint.java

示例12: get

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static HipchatConfig get() {
    return GlobalConfiguration.all().get(HipchatConfig.class);
}
 
开发者ID:groupon,项目名称:DotCi-Plugins-Starter-Pack,代码行数:4,代码来源:HipchatConfig.java

示例13: get

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static SetupConfig get() {
    return GlobalConfiguration.all().get(SetupConfig.class);
}
 
开发者ID:groupon,项目名称:DotCi,代码行数:4,代码来源:SetupConfig.java

示例14: get

import jenkins.model.GlobalConfiguration; //导入依赖的package包/类
public static JobProfilesConfiguration get() {
    return GlobalConfiguration.all().get(JobProfilesConfiguration.class);
}
 
开发者ID:maxbraun,项目名称:job-profiles,代码行数:4,代码来源:JobProfilesConfiguration.java

示例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);
}
 
开发者ID:qubell,项目名称:contrib-jenkins-qubell-plugin,代码行数:7,代码来源:Configuration.java


注:本文中的jenkins.model.GlobalConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。