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


Java TaskDefinition类代码示例

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


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


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