• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java TaskDefinition类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.atlassian.bamboo.task.TaskDefinition的典型用法代码示例。如果您正苦于以下问题:Java TaskDefinition类的具体用法?Java TaskDefinition怎么用?Java TaskDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: shouldDisplay

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
public boolean shouldDisplay(Map<String, Object> context) {
    PlanKey planKey = PlanKeys.getPlanKey((String) context.get("planKey"));
    Chain planChain = (Chain) planManager.getPlanByKey(planKey);
    
    for (ChainStage chainStage : planChain.getStages())
    {
        for (Job  job: chainStage.getJobs())
        {
        	Plan plan = planManager.getPlanByKey(job.getPlanKey());
        	List<TaskDefinition> tasks = plan.getBuildDefinition().getTaskDefinitions();
            for(TaskDefinition task : tasks) {
            	if(
                	task.getPluginKey().equals(DeploymentTask.KEY) ||
                	task.getPluginKey().equals(StatisticsTask.KEY) 
                ) {
                    return true;
                }
            }
        }
    }
    
    return false;
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:24,代码来源:ZendServerViewCondition.java


示例2: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@NotNull
@Override
public Map<String, String> generateTaskConfigMap(@NotNull final ActionParametersMap params, @Nullable final TaskDefinition previousTaskDefinition)
{
	final Map<String, String> config = super.generateTaskConfigMap(params, previousTaskDefinition);

	config.put("host", params.getString("host"));
	config.put("path", params.getString("path"));
	config.put("product", params.getString("product"));
	config.put("major", params.getString("major"));
	config.put("minor", params.getString("minor"));
	config.put("servicepack", params.getString("servicepack"));
	config.put("plug-build", params.getString("plug-build"));

	return config;
}
 
开发者ID:orionhealth,项目名称:xbdd-bamboo-plugin,代码行数:17,代码来源:XBDDTestResultsSenderConfigurator.java


示例3: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
public Map<String, String> generateTaskConfigMap(final ActionParametersMap params, final TaskDefinition previousTaskDefinition)
{
    final Map<String, String> context = super.generateTaskConfigMap(params, previousTaskDefinition);

    context.put("zs_url", params.getString("zs_url"));
    context.put("api_key", params.getString("api_key"));
    context.put("api_secret", params.getString("api_secret"));
    context.put("base_url", params.getString("base_url"));
    context.put("app_name", params.getString("app_name"));
    context.put("zsversion", params.getString("zsversion"));
    context.put("userparams", params.getString("userparams"));
    context.put("custom_options", params.getString("custom_options"));
    context.put("customzpk", params.getString("customzpk"));
    context.put("buildnr", params.getString("buildnr"));
    
    return context;
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:18,代码来源:DeploymentTaskConfigurator.java


示例4: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
public Map<String, String> generateTaskConfigMap(final ActionParametersMap params, final TaskDefinition previousTaskDefinition)
{
    final Map<String, String> context = super.generateTaskConfigMap(params, previousTaskDefinition);

    context.put("zs_url", params.getString("zs_url"));
    context.put("api_key", params.getString("api_key"));
    context.put("api_secret", params.getString("api_secret"));
    context.put("package", params.getString("package"));
    context.put("base_url", params.getString("base_url"));
    context.put("app_name", params.getString("app_name"));
    context.put("zsversion", params.getString("zsversion"));
    context.put("custom_options", params.getString("custom_options"));
    context.put("retry", params.getString("retry"));
    context.put("waittime", params.getString("waittime"));
    
    return context;
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:18,代码来源:RollbackTaskConfigurator.java


示例5: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
public Map<String, String> generateTaskConfigMap(final ActionParametersMap params, final TaskDefinition previousTaskDefinition)
{
    final Map<String, String> context = super.generateTaskConfigMap(params, previousTaskDefinition);

    context.put("zs_url", params.getString("zs_url"));
    context.put("api_key", params.getString("api_key"));
    context.put("api_secret", params.getString("api_secret"));
    context.put("package", params.getString("package"));
    context.put("base_url", params.getString("base_url"));
    context.put("app_name", params.getString("app_name"));
    context.put("zsversion", params.getString("zsversion"));
    context.put("custom_options", params.getString("custom_options"));
    context.put("retry", params.getString("retry"));
    context.put("waittime", params.getString("waittime"));
    context.put("rollback", params.getString("rollback"));
    
    return context;
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:19,代码来源:DeploymentCheckTaskConfigurator.java


示例6: populateContextForView

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public void populateContextForView(final Map<String, Object> context, final TaskDefinition taskDefinition)
{
    super.populateContextForView(context, taskDefinition);
    
    context.put("zs_url", taskDefinition.getConfiguration().get("zs_url"));
    context.put("api_key", taskDefinition.getConfiguration().get("api_key"));
    context.put("api_secret", taskDefinition.getConfiguration().get("api_secret"));
    context.put("base_url", taskDefinition.getConfiguration().get("base_url"));
    context.put("app_name", taskDefinition.getConfiguration().get("app_name"));
    context.put("zsversion", taskDefinition.getConfiguration().get("zsversion"));
    context.put("custom_options", taskDefinition.getConfiguration().get("custom_options"));
    context.put("retry", taskDefinition.getConfiguration().get("retry"));
    context.put("waittime", taskDefinition.getConfiguration().get("waittime"));
    context.put("rollback", taskDefinition.getConfiguration().get("rollback"));
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:17,代码来源:DeploymentCheckTaskConfigurator.java


示例7: getZpkFromArtifactDownload

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
private File getZpkFromArtifactDownload() throws Exception {
	Iterator<TaskDefinition> taskDefinitionIterator = taskContext.getCommonContext().getTaskDefinitions().iterator();
	
	while (taskDefinitionIterator.hasNext()) {
		TaskDefinition taskDefinition = taskDefinitionIterator.next();
		if (!taskDefinition.getPluginKey().equals(ARTIFACT_DOWNLOADER_KEY)) continue;
		
		logger.addBuildLogEntry("Artifact Downloader Task found");
		String zpkDir = taskDefinition.getConfiguration().get("localPath_0").replace("${bamboo.buildNumber}", getBuildNr());
		logger.addBuildLogEntry("ZPK directory configuration found: " + zpkDir);
		
		String zpk = getWorkingDir()
				+ "/" + zpkDir
				+ "/" + getZpkFileName();
		
		return new File(zpk);
	}
	
	throw new Exception("No artifact downloader task found.");
}
 
开发者ID:zend-patterns,项目名称:ZendServerBamboo,代码行数:21,代码来源:Deploy.java


示例8: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@NotNull
@Override
public Map<String, String> generateTaskConfigMap(
		@NotNull final ActionParametersMap params,
		@Nullable final TaskDefinition previousTaskDefinition) {
	final Map<String, String> config = super.generateTaskConfigMap(params,
			previousTaskDefinition);

	config.put("hammer", params.getString("hammer"));
	config.put("drivers", params.getString("drivers"));
	config.put("projectDir", params.getString("projectDir"));
	config.put("command", params.getString("command"));
	config.put("args", params.getString("args"));
	config.put("exportSQL", params.getString("exportSQL"));
	config.put("exportRollbackSQL", params.getString("exportRollbackSQL"));

	return config;
}
 
开发者ID:Datical,项目名称:DaticalDB4Bamboo,代码行数:19,代码来源:DaticalDBTaskConfigurator.java


示例9: populateContextForEdit

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public void populateContextForEdit(
		@NotNull final Map<String, Object> context,
		@NotNull final TaskDefinition taskDefinition) {
	super.populateContextForEdit(context, taskDefinition);

	context.put("hammer", taskDefinition.getConfiguration().get("hammer"));
	context.put("drivers", taskDefinition.getConfiguration().get("drivers"));
	context.put("projectDir", taskDefinition.getConfiguration().get("projectDir"));
	context.put("command", taskDefinition.getConfiguration().get("command"));
	context.put("args", taskDefinition.getConfiguration().get("args"));
	context.put("exportSQL", taskDefinition.getConfiguration().get("exportSQL"));
	context.put("exportRollbackSQL", taskDefinition.getConfiguration().get("exportRollbackSQL"));

	
	
}
 
开发者ID:Datical,项目名称:DaticalDB4Bamboo,代码行数:18,代码来源:DaticalDBTaskConfigurator.java


示例10: execute

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public void execute(@NotNull final StageExecution stageExecution, @NotNull final BuildContext buildContext) {
    PluginSettings pluginSettings = this.pluginSettingsFactory.createGlobalSettings();
    String api_id = (String) pluginSettings.get(AdminServlet.API_ID);
    String api_secret = (String) pluginSettings.get(AdminServlet.API_SECRET);
    String serverUrl = (String) pluginSettings.get(AdminServlet.URL);
    buildContext.getBuildDefinition().getTaskDefinitions().get(0).getPluginKey();
    List<TaskDefinition> tds = buildContext.getBuildDefinition().getTaskDefinitions();
    for (TaskDefinition d : tds) {
        if (d.getPluginKey().equals(Constants.PLUGIN_KEY)) {
            Map<String, String> conf = d.getConfiguration();
            conf.put(AdminServlet.API_ID, api_id);
            conf.put(AdminServlet.API_SECRET, api_secret);
            conf.put(AdminServlet.URL, serverUrl);
        }
    }
}
 
开发者ID:Blazemeter,项目名称:blazemeter-bamboo-plugin,代码行数:18,代码来源:SettingsProcessor.java


示例11: populateContextForEdit

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
/**
 * from backend to view
 */
public void populateContextForEdit(Map<String, Object> context, TaskDefinition taskDefinition) {
    super.populateContextForEdit(context, taskDefinition);
    PluginSettings pluginSettings = this.pluginSettingsFactory.createGlobalSettings();
    String psai = (String) pluginSettings.get(AdminServlet.API_ID);
    String psas = (String) pluginSettings.get(AdminServlet.API_SECRET);
    String pssu = (String) pluginSettings.get(AdminServlet.URL);
    Map<String, String> config = taskDefinition.getConfiguration();
    context.put(AdminServlet.API_ID, psai);
    context.put(AdminServlet.API_SECRET, psas);
    context.put(AdminServlet.URL, psai);
    context.put(Constants.SETTINGS_SELECTED_TEST_ID, config.get(Constants.SETTINGS_SELECTED_TEST_ID));
    context.put(Constants.SETTINGS_NOTES, config.get(Constants.SETTINGS_NOTES));
    context.put(Constants.SETTINGS_JUNIT_REPORT, config.get(Constants.SETTINGS_JUNIT_REPORT));
    context.put(Constants.SETTINGS_JTL_REPORT, config.get(Constants.SETTINGS_JTL_REPORT));
    context.put(Constants.SETTINGS_JMETER_PROPERTIES, config.get(Constants.SETTINGS_JMETER_PROPERTIES));
    context.put(Constants.SETTINGS_JTL_PATH, config.get(Constants.SETTINGS_JTL_PATH));
    context.put(Constants.SETTINGS_JUNIT_PATH, config.get(Constants.SETTINGS_JUNIT_PATH));
    UserNotifier serverUserNotifier = new ServerUserNotifier();
    Logger logger = new ServerLogger();
    utils = new BambooBzmUtils(psai, psas, pssu, pssu, serverUserNotifier, logger);
    logger.info("BlazeMeter task is opened for configuration.");
    fillContextWithTests(context);
}
 
开发者ID:Blazemeter,项目名称:blazemeter-bamboo-plugin,代码行数:27,代码来源:ConfigTask.java


示例12: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
/**
 * from gui to backend
 */
@Override
public Map<String, String> generateTaskConfigMap(ActionParametersMap params, TaskDefinition previousTaskDefinition) {
    final Map<String, String> config = super.generateTaskConfigMap(params, previousTaskDefinition);

    config.put(Constants.SETTINGS_SELECTED_TEST_ID, params.getString(Constants.SETTINGS_SELECTED_TEST_ID).trim());
    config.put(Constants.SETTINGS_JMETER_PROPERTIES, params.getString(Constants.SETTINGS_JMETER_PROPERTIES).trim());
    config.put(Constants.SETTINGS_NOTES, params.getString(Constants.SETTINGS_NOTES).trim());
    config.put(Constants.SETTINGS_JTL_PATH, params.getString(Constants.SETTINGS_JTL_PATH).trim());
    config.put(Constants.SETTINGS_JUNIT_PATH, params.getString(Constants.SETTINGS_JUNIT_PATH).trim());
    String jtlReport = params.getString(Constants.SETTINGS_JTL_REPORT) == null ? "false" : "true";
    String junitReport = params.getString(Constants.SETTINGS_JUNIT_REPORT) == null ? "false" : "true";
    config.put(Constants.SETTINGS_JTL_REPORT, jtlReport);
    config.put(Constants.SETTINGS_JUNIT_REPORT, junitReport);

    PluginSettings pluginSettings = this.pluginSettingsFactory.createGlobalSettings();
    config.put(AdminServlet.API_ID,
            (String) pluginSettings.get(AdminServlet.API_ID));
    config.put(AdminServlet.API_SECRET,
            (String) pluginSettings.get(AdminServlet.API_SECRET));
    config.put(AdminServlet.URL,
            (String) pluginSettings.get(AdminServlet.URL));
    return config;
}
 
开发者ID:Blazemeter,项目名称:blazemeter-bamboo-plugin,代码行数:27,代码来源:ConfigTask.java


示例13: setUpBzmUtils

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
private BambooBzmUtils setUpBzmUtils(TaskContext context, FileHandler logHandler) throws TaskException {
    List<TaskDefinition> tds = context.getBuildContext().getBuildDefinition().getTaskDefinitions();
    final BuildLogger logger = context.getBuildLogger();

    String apiId = null;
    String apiSecret = null;
    String url = null;
    for (TaskDefinition d : tds) {
        if (d.getPluginKey().equals(Constants.PLUGIN_KEY)) {
            Map<String, String> conf = d.getConfiguration();
            apiId = conf.get(AdminServlet.API_ID);
            apiSecret = conf.get(AdminServlet.API_SECRET);
            url = conf.get(AdminServlet.URL);
        }
    }
    if (StringUtils.isBlank(apiId)) {
        logger.addBuildLogEntry("BlazeMeter user key not defined!");
        throw new TaskException("BlazeMeter user key not defined!");
    }
    UserNotifier notifier = new AgentUserNotifier(logger);
    Logger log = new AgentLogger(logHandler);
    BambooBzmUtils utils = new BambooBzmUtils(apiId, apiSecret, url, url, notifier, log);
    return utils;
}
 
开发者ID:Blazemeter,项目名称:blazemeter-bamboo-plugin,代码行数:25,代码来源:TaskType.java


示例14: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@NotNull
public Map<String, String> generateTaskConfigMap(@NotNull final ActionParametersMap params, @Nullable final TaskDefinition previousTaskDefinition) {
    final Map<String, String> config = super.generateTaskConfigMap(params, previousTaskDefinition);
    config.put(xUnitParserTask.TEST_FILE_PATTERN, params.getString(xUnitParserTask.TEST_FILE_PATTERN));
    config.put(xUnitParserTask.COLLECT_OUTDATED_FILES, params.getString(xUnitParserTask.COLLECT_OUTDATED_FILES));
    return config;
}
 
开发者ID:wwwlicious,项目名称:wwwlicious.bamboo.xunit,代码行数:8,代码来源:xUnitParserConfigurator.java


示例15: populateContextForEdit

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public void populateContextForEdit(Map<String, Object> context, TaskDefinition taskDefinition) {
	context.put(UTIL_LIST, uiConfigSupport.getExecutableLabels(SA_CLIENT_UTIL_KEY));
	context.put(CRED_LIST, getCredentials());
	Map<String, String> config = taskDefinition.getConfiguration();
	context.put(CFG_SELECTED_UTIL, config.get(CFG_SELECTED_UTIL));
	context.put(CFG_SELECTED_CRED, config.get(CFG_SELECTED_CRED));
	context.put(CFG_APP_ID, config.get(CFG_APP_ID));
	context.put(CFG_SUSPEND, Boolean.valueOf(config.get(CFG_SUSPEND)));
	context.put(CFG_MAX_HIGH, config.get(CFG_MAX_HIGH));
	context.put(CFG_MAX_MEDIUM, config.get(CFG_MAX_MEDIUM));
	context.put(CFG_MAX_LOW, config.get(CFG_MAX_LOW));
}
 
开发者ID:AppSecDev,项目名称:asoc-bamboo-plugin,代码行数:14,代码来源:SASTScanTaskConfigurator.java


示例16: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public Map<String, String> generateTaskConfigMap(ActionParametersMap params, TaskDefinition previousTaskDefinition) {
	Map<String, String> config = super.generateTaskConfigMap(params, previousTaskDefinition);
	config.put(CFG_SELECTED_UTIL, params.getString(CFG_SELECTED_UTIL));
	config.put(CFG_SELECTED_CRED, params.getString(CFG_SELECTED_CRED));
	config.put(CFG_APP_ID, params.getString(CFG_APP_ID));
	config.put(CFG_SUSPEND, Boolean.toString(params.getBoolean(CFG_SUSPEND)));
	config.put(CFG_MAX_HIGH, params.getString(CFG_MAX_HIGH));
	config.put(CFG_MAX_MEDIUM, params.getString(CFG_MAX_MEDIUM));
	config.put(CFG_MAX_LOW, params.getString(CFG_MAX_LOW));
	return config;
}
 
开发者ID:AppSecDev,项目名称:asoc-bamboo-plugin,代码行数:13,代码来源:SASTScanTaskConfigurator.java


示例17: generateTaskConfigMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public Map<String, String> generateTaskConfigMap(final ActionParametersMap params,
        final TaskDefinition previousTaskDefinition) {
    final Map<String, String> configMap = super.generateTaskConfigMap(params, previousTaskDefinition);

    for (final HubScanConfigFieldEnum param : HubScanConfigFieldEnum.values()) {
        final String key = param.getKey();
        final String value = params.getString(key);
        configMap.put(key, value);
    }
    return configMap;
}
 
开发者ID:blackducksoftware,项目名称:hub-bamboo,代码行数:13,代码来源:HubScanTaskConfigurator.java


示例18: populateContextMap

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
private void populateContextMap(final Map<String, Object> context, final TaskDefinition taskDefinition) {

        for (final HubScanConfigFieldEnum param : HubScanConfigFieldEnum.values()) {
            final String key = param.getKey();
            context.put(key, taskDefinition.getConfiguration().get(key));
        }
        context.put(PHASES, getHubPhases());
        context.put(DISTRIBUTIONS, getHubDistributions());
    }
 
开发者ID:blackducksoftware,项目名称:hub-bamboo,代码行数:10,代码来源:HubScanTaskConfigurator.java


示例19: populateRuntimeTaskData

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public Map<String, String> populateRuntimeTaskData(final TaskDefinition taskDef, final CommonContext context) {
	final Map<String, String> map = new HashMap<String, String>();
	final SecureToken token = tokenService
			.generate(AuthenticableMessage.Identification.forResultKey(context.getResultKey()));
	map.put(HubBambooUtils.HUB_TASK_SECURE_TOKEN, token.getToken());

	return map;
}
 
开发者ID:blackducksoftware,项目名称:hub-bamboo,代码行数:10,代码来源:HubTaskDataProvider.java


示例20: populateContextForEdit

import com.atlassian.bamboo.task.TaskDefinition; //导入依赖的package包/类
@Override
public void populateContextForEdit(@NotNull final Map<String, Object> context, @NotNull final TaskDefinition taskDefinition)
{
	super.populateContextForEdit(context, taskDefinition);

	context.put("host", taskDefinition.getConfiguration().get("host"));
	context.put("path", taskDefinition.getConfiguration().get("path"));
	context.put("product", taskDefinition.getConfiguration().get("product"));
	context.put("major", taskDefinition.getConfiguration().get("major"));
	context.put("minor", taskDefinition.getConfiguration().get("minor"));
	context.put("servicepack", taskDefinition.getConfiguration().get("servicepack"));
	context.put("plug-build", taskDefinition.getConfiguration().get("plug-build"));
}
 
开发者ID:orionhealth,项目名称:xbdd-bamboo-plugin,代码行数:14,代码来源:XBDDTestResultsSenderConfigurator.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StdOut类代码示例发布时间:2022-05-22
下一篇:
Java SelectPopupDialog类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap