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


Java BuildProgressLogger类代码示例

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


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

示例1: makeProgramCommandLine

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
@NotNull
@Override
public ProgramCommandLine makeProgramCommandLine() throws RunBuildException {
  final PowerShellInfo info = selectTool();
  final String psExecutable = info.getExecutablePath();
  final String workDir = getWorkingDirectory().getPath();
  final PowerShellExecutionMode mode = PowerShellExecutionMode.fromString(getRunnerParameters().get(RUNNER_EXECUTION_MODE));
  final BuildProgressLogger buildLogger = getBuild().getBuildLogger();
  buildLogger.message("PowerShell Executable: " + psExecutable);
  buildLogger.message("Working directory: " + workDir);
  if (PowerShellExecutionMode.STDIN == mode) {
    return getStdInCommandLine(info, getEnv(info), workDir, generateCommand(info));
  } else if (PowerShellExecutionMode.PS1 == mode) {
    return getFileCommandLine(info, getEnv(info), workDir, generateArguments(info));
  } else {
    throw new RunBuildException("Could not select PowerShell tool for mode [" + mode + "]");
  }
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:19,代码来源:BasePowerShellService.java

示例2: setUp

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
@BeforeMethod
public void setUp() throws Exception {
    uploadTaskLog = "Upload to S3 bucket: ";
    noUploadErrorLog = "No files to upload have been found!";
    taskDoneLog = "Done";

    amazonS3Mock = mock(AmazonS3.class);
    loggerMock = mock(BuildProgressLogger.class);
    runnerParametersMock = new HashMap<>();
    agentCheckoutDirectoryMock = mock(File.class);
    extensionHolderMock = mock(ExtensionHolder.class);

    uploadAdapterMock = mock(AWSS3UploadAdapter.class);
    deleteAdapterMock = mock(AWSS3DeleteAdapter.class);

    awsS3AdapterMock = new AWSS3Adapter(uploadAdapterMock, deleteAdapterMock);
    processAdapterHelperMock = mock(AWSS3BuildProcessAdapterHelper.class);
    when(processAdapterHelperMock.createClient(anyString(), anyString())).thenReturn(amazonS3Mock);
    when(processAdapterHelperMock.createClientWithProxy(anyString(), anyString(), anyString())).thenReturn(amazonS3Mock);
}
 
开发者ID:gonzadocarmo,项目名称:teamcity-s3-plugin,代码行数:21,代码来源:AWSS3BuildProcessAdapterTest.java

示例3: dumpPdbGuidsToFile

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
public int dumpPdbGuidsToFile(Collection<File> files, File output, BuildProgressLogger buildLogger) throws IOException {
  final GeneralCommandLine commandLine = new GeneralCommandLine();
  commandLine.setExePath(myExePath.getPath());
  commandLine.addParameter(DUMP_SYMBOL_SIGN_CMD);
  commandLine.addParameter(String.format("/o=%s", output.getPath()));
  commandLine.addParameter(String.format("/i=%s", dumpPathsToFile(files).getPath()));
  buildLogger.message(String.format("Running command %s", commandLine.getCommandLineString()));
  final ExecResult execResult = SimpleCommandLineProcessRunner.runCommand(commandLine, null);
  final String stdout = execResult.getStdout();
  if(!stdout.isEmpty()){
    buildLogger.message("Stdout: " + stdout);
  }
  final int exitCode = execResult.getExitCode();
  if (exitCode != 0) {
    buildLogger.warning(String.format("%s ends with non-zero exit code %s.", SYMBOLS_EXE, execResult));
    buildLogger.warning("Stdout: " + stdout);
    buildLogger.warning("Stderr: " + execResult.getStderr());
    final Throwable exception = execResult.getException();
    if(exception != null){
      buildLogger.exception(exception);
    }
  }
  return exitCode;
}
 
开发者ID:JetBrains,项目名称:teamcity-symbol-server,代码行数:25,代码来源:JetSymbolsExe.java

示例4: patch

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
public void patch(File symbolsFile, BuildProgressLogger buildLogger) throws Exception {
  final Collection<File> sourceFiles = mySrcToolExe.getReferencedSourceFiles(symbolsFile);
  final String symbolsFileCanonicalPath = symbolsFile.getCanonicalPath();
  if(sourceFiles.isEmpty()){
    final String message = "No source information found in pdb file " + symbolsFileCanonicalPath;
    buildLogger.warning(message);
    LOG.debug(message);
    return;
  }
  final File tmpFile = FileUtil.createTempFile(myWorkingDir, "pdb-", ".patch", false);
  int processedFilesCount = mySrcSrvStreamBuilder.dumpStreamToFile(tmpFile, sourceFiles);
  if(processedFilesCount == 0){
    buildLogger.warning(String.format("Sources appeared in file %s weren't actually indexed. Looks like related binary file wasn't built during current build.", symbolsFileCanonicalPath));
  } else {
    buildLogger.message(String.format("Information about %d source files was updated", processedFilesCount));
  }
  myPdbStrExe.doCommand(PdbStrExeCommands.WRITE, symbolsFile, tmpFile, PdbStrExe.SRCSRV_STREAM_NAME);
}
 
开发者ID:JetBrains,项目名称:teamcity-symbol-server,代码行数:19,代码来源:PdbFilePatcher.java

示例5: makeProgramCommandLine

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
@NotNull
@Override
public ProgramCommandLine makeProgramCommandLine() throws RunBuildException {
    BuildProgressLogger buildLogger = getLogger();
    BuildRunnerContext buildRunnerContext = getRunnerContext();
    Map<String, String> programEnvironmentVariables = buildRunnerContext.getBuildParameters().getEnvironmentVariables();
    String programWorkingDirectory = getProgramWorkingDirectory();
    String programPath = getProgramPath();
    List<String> programArgs = getProgramArgs();

    buildLogger.message("Program environment variables: " + programEnvironmentVariables.toString());
    buildLogger.message("Program working directory: " + programWorkingDirectory);
    buildLogger.message("Program path: " + programPath);
    buildLogger.message("Program args: " + programArgs.toString());

    return new SimpleProgramCommandLine(buildRunnerContext.getBuildParameters().getEnvironmentVariables(), programWorkingDirectory, programPath, programArgs);
}
 
开发者ID:stevenlauwers22,项目名称:DotNetBuild.TeamCity,代码行数:18,代码来源:DotNetBuildBuildService.java

示例6: TodoBuildProcessAdapter

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
public TodoBuildProcessAdapter(
        @NotNull ArtifactsWatcher artifactsWatcher,
        @NotNull BuildProgressLogger logger,
        @NotNull File workingRoot,
        @NotNull File reportingRoot,
        @NotNull List<String> includes,
        @NotNull List<String> excludes,
        @NotNull List<String> minors,
        @NotNull List<String> majors,
        @NotNull List<String> criticals) {
    super(logger);
    this.artifactsWatcher = artifactsWatcher;
    this.workingRoot = workingRoot;
    this.reportingRoot = reportingRoot;
    this.includes = includes;
    this.excludes = excludes;
    this.minors = minors;
    this.majors = majors;
    this.criticals = criticals;
}
 
开发者ID:rvdginste,项目名称:todo-teamcity-plugin,代码行数:21,代码来源:TodoBuildProcessAdapter.java

示例7: block

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
@NotNull
public static BuildProcess block(@NotNull final BuildProgressLogger logger,
                                 @NotNull final String blockName,
                                 @NotNull final String blockText,
                                 @NotNull final BuildProcess proc) {
  return new DelegatingBuildProcess(new DelegatingBuildProcess.Action() {
    @NotNull
    @Override
    public BuildProcess startImpl() throws RunBuildException {
      logger.activityStarted(blockName, blockText, "vm");
      return proc;
    }

    @Override
    public void finishedImpl() {
      logger.activityFinished(blockName, "vm");
    }
  });
}
 
开发者ID:jonnyzzz,项目名称:TeamCity.Virtual,代码行数:20,代码来源:BaseVM.java

示例8: makeProgramCommandLine

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@NotNull
@Override
public ProgramCommandLine makeProgramCommandLine() throws RunBuildException {

    BuildProgressLogger buildLogger = getLogger();
    BuildRunnerContext buildRunnerContext = getRunnerContext();
    Map<String, String> programEnvironmentVariables = buildRunnerContext.getBuildParameters().getEnvironmentVariables();
    String programPath = getProgramPath();
    List<String> programArgs = getProgramArgs();

    buildLogger.message("Program environment variables: " + programEnvironmentVariables.toString());
    buildLogger.message("Program working directory: " + workingDirectory);
    buildLogger.message("Program path: " + programPath);
    buildLogger.message("Program args: " + programArgs.toString());

    return new SimpleProgramCommandLine(programEnvironmentVariables, workingDirectory, programPath, programArgs);
}
 
开发者ID:allure-framework,项目名称:allure-teamcity,代码行数:21,代码来源:AllureBuildServiceAdapter.java

示例9: getProgramPath

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
private String getProgramPath() throws RunBuildException {

        BuildProgressLogger buildLogger = getLogger();
        String path = clientDirectory.toAbsolutePath().toString();
        String executableName = getExecutableName();

        String executableFile = path + File.separatorChar + "bin" + File.separatorChar + executableName;
        File file = new File(executableFile);

        if (!file.exists())
            throw new RunBuildException("Cannot find executable \'" + executableFile + "\'");
        if (!file.setExecutable(true))
            buildLogger.message("Cannot set file: " + executableFile + " executable.");

        return file.getAbsolutePath();

    }
 
开发者ID:allure-framework,项目名称:allure-teamcity,代码行数:18,代码来源:AllureBuildServiceAdapter.java

示例10: getTransport

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
@Nullable
public URLContentRetriever getTransport(@NotNull Map<String, String> context) {

  final BuildProgressLogger buildLogger = myBuildTracker.getCurrentBuild().getBuildLogger();
  if (!shouldUseTorrentTransport()) {
    TorrentUtil.log2Build("BitTorrent artifacts transport is disabled in server settings", buildLogger);
    return null;
  }

  if (!myAgentTorrentsManager.isTransportEnabled()) {
    return null;
  }

  return new TorrentTransport(myAgentTorrentsManager.getTorrentsSeeder(),
          createHttpClient(),
          buildLogger,
          myAgentConfig.getServerUrl(),
          myAgentTorrentsManager.getTorrentsDownloadStatistic(),
          myLeechSettings,
          myTorrentFilesFactory);
}
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:22,代码来源:TorrentTransportFactory.java

示例11: TorrentTransport

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
protected TorrentTransport(@NotNull final TorrentsSeeder seeder,
                           @NotNull final HttpClient httpClient,
                           @NotNull final BuildProgressLogger buildLogger,
                           @NotNull final String serverUrl,
                           @NotNull final TorrentsDownloadStatistic torrentsDownloadStatistic,
                           @NotNull final LeechSettings leechSettings,
                           @NotNull final TorrentFilesFactory torrentFilesFactory) {
  super(httpClient, serverUrl);
  mySeeder = seeder;
  myLeechSettings = leechSettings;
  myClient = mySeeder.getClient();
  myTorrentFilesFactory = torrentFilesFactory;
  myTorrentsDownloadStatistic = torrentsDownloadStatistic;
  myHttpClient = httpClient;
  myBuildLogger = buildLogger;
  myTorrentsForArtifacts = new HashMap<String, String>();
  myCurrentDownload = new AtomicReference<Thread>();
  myInterrupted = new AtomicBoolean(false);
}
 
开发者ID:JetBrains,项目名称:teamcity-torrent-plugin,代码行数:20,代码来源:TorrentTransportFactory.java

示例12: executeWithWrapper

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
private SimpleProgramCommandLine executeWithWrapper(@NotNull final Map<String, String> env,
                                                    @NotNull final String workDir,
                                                    @NotNull final String argsList) throws RunBuildException {
  final File scriptFile = generateNixScriptFile(argsList);
  final BuildProgressLogger buildLogger = getBuild().getBuildLogger();
  buildLogger.message("Wrapper script: " + scriptFile);
  buildLogger.message("Command: " + argsList);
  enableExecution(scriptFile);
  return new SimpleProgramCommandLine(env, workDir, scriptFile.getAbsolutePath(), Collections.<String>emptyList());
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:11,代码来源:PowerShellServiceUnix.java

示例13: getStdInCommandLine

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
@Override
protected SimpleProgramCommandLine getStdInCommandLine(@NotNull final PowerShellInfo info,
                                                       @NotNull final Map<String, String> env,
                                                       @NotNull final String workDir,
                                                       @NotNull final String command) throws RunBuildException {
  final List<String> args = generateRunScriptArguments(command);
  final String executable = myCommands.getCMDWrappedCommand(info, getEnvironmentVariables());
  final BuildProgressLogger buildLogger = getBuild().getBuildLogger();
  buildLogger.message("Executable wrapper: " + executable);
  buildLogger.message("Wrapper arguments: " + Arrays.toString(args.toArray()));
  buildLogger.message("Command: " + command);
  return new SimpleProgramCommandLine(env, workDir, executable, args);
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:14,代码来源:PowerShellServiceWindows.java

示例14: getFileCommandLine

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
@Override
protected SimpleProgramCommandLine getFileCommandLine(@NotNull final PowerShellInfo info,
                                                      @NotNull final Map<String, String> env,
                                                      @NotNull final String workDir,
                                                      @NotNull final List<String> args) throws RunBuildException {
  final BuildProgressLogger buildLogger = getBuild().getBuildLogger();
  final String command = myCommands.getNativeCommand(info);
  buildLogger.message("Command: " + command);
  buildLogger.message("PowerShell arguments: " + StringUtil.join(args, ", "));
  return new SimpleProgramCommandLine(env, workDir, command, args);
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:12,代码来源:PowerShellServiceWindows.java

示例15: AutotoolsTestsReporter

import jetbrains.buildServer.agent.BuildProgressLogger; //导入依赖的package包/类
private AutotoolsTestsReporter(final long timeBeforeStart, @NotNull final BuildProgressLogger logger,
                              @NotNull final String srcPath) {
  myTimeBeforeStart = timeBeforeStart;
  myLogger = logger;
  mySrcPath = srcPath;
  myTestsLogFiles = new HashMap<String, File>();
  myTestsTrsFiles = new HashMap<String, File>();
  myTestsXmlFiles = new ArrayList<File>();
  hasDejagnu = false;

}
 
开发者ID:unix-junkie,项目名称:teamcity-autotools-plugin,代码行数:12,代码来源:AutotoolsTestsReporter.java


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