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


Java InitMilestone.PLUGINS_STARTED属性代码示例

本文整理汇总了Java中hudson.init.InitMilestone.PLUGINS_STARTED属性的典型用法代码示例。如果您正苦于以下问题:Java InitMilestone.PLUGINS_STARTED属性的具体用法?Java InitMilestone.PLUGINS_STARTED怎么用?Java InitMilestone.PLUGINS_STARTED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在hudson.init.InitMilestone的用法示例。


在下文中一共展示了InitMilestone.PLUGINS_STARTED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

@Initializer(after=InitMilestone.PLUGINS_STARTED)
public static void init() {
    if (germanHolidayCalculator == null) {
        germanHolidayCalculator = new GermanHolidayCalculator();
    }

    Calendar now = Calendar.getInstance();

    int year = now.get(Calendar.YEAR);

    for (int i = 0; i < 6; i++) {
        year = year + i;
        List<Calendar> holidays = germanHolidayCalculator.calculatePublicHolidays(year);
        publicHolidays.put(year, holidays);
    }
}
 
开发者ID:mvb-online,项目名称:jenkins-run-condition-holiday-plugin,代码行数:16,代码来源:GermanHolidayCalculator.java

示例2: addAliases

@Initializer(before = InitMilestone.PLUGINS_STARTED)
public static void addAliases() {
    Jenkins.XSTREAM2.addCompatibilityAlias(
            "org.csanchez.jenkins.plugins.kubernetes.OpenShiftBearerTokenCredentialImpl",
            org.jenkinsci.plugins.kubernetes.credentials.OpenShiftBearerTokenCredentialImpl.class);
    Jenkins.XSTREAM2.addCompatibilityAlias(
            "org.csanchez.jenkins.plugins.kubernetes.OpenShiftTokenCredentialImpl",
            StringCredentialsImpl.class);
    Jenkins.XSTREAM2.addCompatibilityAlias("org.csanchez.jenkins.plugins.kubernetes.ServiceAccountCredential",
            org.jenkinsci.plugins.kubernetes.credentials.FileSystemServiceAccountCredential.class);
}
 
开发者ID:carlossg,项目名称:jenkins-kubernetes-plugin,代码行数:11,代码来源:KubernetesCloud.java

示例3: migrate

@Initializer(after = InitMilestone.PLUGINS_STARTED)
public static void migrate() throws IOException {
    GitLabConnectionConfig descriptor = (GitLabConnectionConfig) Jenkins.getInstance().getDescriptor(GitLabConnectionConfig.class);
    for (GitLabConnection connection : descriptor.getConnections()) {
        if (connection.apiTokenId == null && connection.apiToken != null) {
            for (CredentialsStore credentialsStore : CredentialsProvider.lookupStores(Jenkins.getInstance())) {
                if (credentialsStore instanceof SystemCredentialsProvider.StoreImpl) {
                    List<Domain> domains = credentialsStore.getDomains();
                    connection.apiTokenId = UUID.randomUUID().toString();
                    credentialsStore.addCredentials(domains.get(0),
                        new GitLabApiTokenImpl(CredentialsScope.SYSTEM, connection.apiTokenId, "GitLab API Token", Secret.fromString(connection.apiToken)));
                }
            }
        }
    }
    descriptor.save();
}
 
开发者ID:jenkinsci,项目名称:gitlab-plugin,代码行数:17,代码来源:GitLabConnection.java

示例4: initAliases

@Initializer(after = InitMilestone.PLUGINS_STARTED)
public static void initAliases() {
    Jenkins jenkins = Jenkins.getInstance();
    if (jenkins == null) {
        LOGGER.severe("Called for initialization but Jenkins instance no longer available.");
        return;
    }
    // Alias all RunSelectors to their simple names
    for (Descriptor<RunSelector> d : jenkins.getDescriptorByType(DescriptorImpl.class).getRunSelectors())
        XSTREAM.alias(d.clazz.getSimpleName(), d.clazz);
}
 
开发者ID:jenkinsci,项目名称:run-selector-plugin,代码行数:11,代码来源:RunSelectorParameter.java

示例5: initAliases

/**
 * 
 */
@Initializer(after=InitMilestone.PLUGINS_STARTED)
public static void initAliases() {
    Jenkins jenkins = Jenkins.getInstance();
    if (jenkins == null) {
        LOGGER.severe("Called for initialization but Jenkins instance no longer available.");
        return;
    }
    for (RunFilterDescriptor d : RunFilter.all()) {
        XSTREAM.alias(d.clazz.getSimpleName(), d.clazz);
    }
}
 
开发者ID:jenkinsci,项目名称:run-selector-plugin,代码行数:14,代码来源:ParameterizedRunFilter.java

示例6: initializeXStream

@Initializer(before=InitMilestone.PLUGINS_STARTED)
public static void initializeXStream() {
	InheritableParameterReferenceConverter conv = new InheritableParameterReferenceConverter();
	
	final XStream2[] xs = {
			Jenkins.XSTREAM2, Run.XSTREAM2, Items.XSTREAM2
	};
	for (XStream2 x : xs) {
		//Add the custom converter to hide some fields
		x.registerConverter(conv);
	}
}
 
开发者ID:i-m-c,项目名称:jenkins-inheritance-plugin,代码行数:12,代码来源:InheritableStringParameterReferenceDefinition.java

示例7: installLoadBalancer

/**
 * Replaces {@link LoadBalancer} registered to Jenkins to ScoringLoadBalancer.
 * 
 * The {@link LoadBalancer} originally registered are used as one to fall back.
 */
@Initializer(after=InitMilestone.PLUGINS_STARTED, fatal=false)
public static void installLoadBalancer()
{
    LOGGER.info("Replace LoadBalancer to ScoringLoadBalancer");
    Queue q = Jenkins.getInstance().getQueue();
    LoadBalancer fallback = q.getLoadBalancer();
    q.setLoadBalancer(new ScoringLoadBalancer(fallback));
}
 
开发者ID:ikedam,项目名称:scoring-load-balancer,代码行数:13,代码来源:ScoringLoadBalancer.java

示例8: registerXStream

/**
 * Gives this class an alias for configuration XML.
 */
@Initializer(before = InitMilestone.PLUGINS_STARTED)
@SuppressWarnings(UNUSED)
public static void registerXStream() {
    Items.XSTREAM.alias("matrix-multi-branch-project", MatrixMultiBranchProject.class);
}
 
开发者ID:jenkinsci,项目名称:multi-branch-project-plugin,代码行数:8,代码来源:MatrixMultiBranchProject.java

示例9: registerXStream

/**
 * Gives this class an alias for configuration XML.
 */
@SuppressWarnings(UNUSED)
@Initializer(before = InitMilestone.PLUGINS_STARTED)
public static void registerXStream() {
    Items.XSTREAM.alias("branch-list-view", BranchListView.class);
}
 
开发者ID:jenkinsci,项目名称:multi-branch-project-plugin,代码行数:8,代码来源:BranchListView.java

示例10: registerXStream

/**
 * Gives this class an alias for configuration XML.
 */
@SuppressWarnings(UNUSED)
@Initializer(before = InitMilestone.PLUGINS_STARTED)
public static void registerXStream() {
    Items.XSTREAM.alias("ivy-multi-branch-project", IvyMultiBranchProject.class);
}
 
开发者ID:jenkinsci,项目名称:multi-branch-project-plugin,代码行数:8,代码来源:IvyMultiBranchProject.java

示例11: registerXStream

/**
 * Gives this class an alias for configuration XML.
 */
@Initializer(before = InitMilestone.PLUGINS_STARTED)
@SuppressWarnings("unused")
public static void registerXStream() {
    Items.XSTREAM.alias("freestyle-multi-branch-project", FreeStyleMultiBranchProject.class);
}
 
开发者ID:jenkinsci,项目名称:multi-branch-project-plugin,代码行数:8,代码来源:FreeStyleMultiBranchProject.java

示例12: registerXStream

/**
 * Gives this class an alias for configuration XML.
 */
@Initializer(before = InitMilestone.PLUGINS_STARTED)
@SuppressWarnings(UNUSED)
public static void registerXStream() {
    Items.XSTREAM.alias("maven-multi-branch-project", MavenMultiBranchProject.class);
}
 
开发者ID:jenkinsci,项目名称:multi-branch-project-plugin,代码行数:8,代码来源:MavenMultiBranchProject.java

示例13: setRuntimeDelegate

@Initializer(before = InitMilestone.PLUGINS_STARTED)
public static void setRuntimeDelegate() {
    RuntimeDelegate.setInstance(new ResteasyProviderFactory());
}
 
开发者ID:jenkinsci,项目名称:gitlab-plugin,代码行数:4,代码来源:ResteasyGitLabClientBuilder.java

示例14: addAlias

@Initializer(before=InitMilestone.PLUGINS_STARTED)
public static void addAlias() {
    Items.XSTREAM2.addCompatibilityAlias("org.jenkinsci.plugins.awsbeanstalkpublisher.AWSEBDeploymentBuilder", AWSEBBuilder.class);
}
 
开发者ID:DavidTanner,项目名称:aws-beanstalk-publisher,代码行数:4,代码来源:AWSEBBuilder.java

示例15: addAlias

@Initializer(before=InitMilestone.PLUGINS_STARTED)
public static void addAlias() {
    Items.XSTREAM2.addCompatibilityAlias("org.jenkinsci.plugins.awsbeanstalkpublisher.AWSEBDeploymentPublisher", AWSEBPublisher.class);
}
 
开发者ID:DavidTanner,项目名称:aws-beanstalk-publisher,代码行数:4,代码来源:AWSEBPublisher.java


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