本文整理汇总了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);
}
示例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();
}
示例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);
}
示例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);
}
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例13: setRuntimeDelegate
@Initializer(before = InitMilestone.PLUGINS_STARTED)
public static void setRuntimeDelegate() {
RuntimeDelegate.setInstance(new ResteasyProviderFactory());
}
示例14: addAlias
@Initializer(before=InitMilestone.PLUGINS_STARTED)
public static void addAlias() {
Items.XSTREAM2.addCompatibilityAlias("org.jenkinsci.plugins.awsbeanstalkpublisher.AWSEBDeploymentBuilder", AWSEBBuilder.class);
}
示例15: addAlias
@Initializer(before=InitMilestone.PLUGINS_STARTED)
public static void addAlias() {
Items.XSTREAM2.addCompatibilityAlias("org.jenkinsci.plugins.awsbeanstalkpublisher.AWSEBDeploymentPublisher", AWSEBPublisher.class);
}