Package hudson.model

Examples of hudson.model.StreamBuildListener


        addMockTestResultAction(build6, build6, build6);
        checkRecipients(build6, "A", "K", "U", "W");
    }

    private static void checkRecipients(final Build build, final String... inAuthors) throws AddressException {
        ExtendedEmailPublisherContext context = new ExtendedEmailPublisherContext(null, build, new Launcher.LocalLauncher(StreamTaskListener.fromStdout()), new StreamBuildListener(System.out, Charset.defaultCharset()));
        EnvVars envVars = new EnvVars();
        Set<InternetAddress> to = new HashSet<InternetAddress>();
        Set<InternetAddress> cc = new HashSet<InternetAddress>();
        Set<InternetAddress> bcc = new HashSet<InternetAddress>();
        FailingTestSuspectsRecipientProvider provider = new FailingTestSuspectsRecipientProvider();
View Full Code Here


    public void annotate(ConsoleNote ann) throws IOException {
        core.annotate(ann);
    }

    private Object writeReplace() throws IOException {
        return new StreamBuildListener(logger);
    }
View Full Code Here

     * @throws InterruptedException
     */
    //@Test
    public void testDeploy() throws IOException, InterruptedException {
       
        adapter.redeploy(new FilePath(new File("src/test/simple.war")), "contextPath", null, null, new StreamBuildListener(System.out));
    }
View Full Code Here

   
    //@Test
    public void testRemoteDeploy() throws IOException, InterruptedException {
      

        remoteAdapter.redeploy(new FilePath(new File("src/test/simple.war")), "contextPath", null, null, new StreamBuildListener(System.out));
    }
View Full Code Here

            }


            p.getScm().buildEnvVars(b, env);

            StreamBuildListener buildListener = new StreamBuildListener((OutputStream) listener.getLogger());

            for (NodeProperty nodeProperty : Hudson.getInstance().getGlobalNodeProperties()) {
                Environment environment = nodeProperty.setUp(b, launcher, (BuildListener) buildListener);
                if (environment != null) {
                    environment.buildEnvVars(env);
View Full Code Here

    public void annotate(ConsoleNote ann) throws IOException {
        core.annotate(ann);
    }

    private Object writeReplace() {
        return new StreamBuildListener(logger);
    }
View Full Code Here

    @Override public void run() {
        // TODO how to set startTime? reflection? https://trello.com/c/Gbg8I3pl/41-run-starttime
        // Some code here copied from execute(RunExecution), but subsequently modified quite a bit.
        try {
            OutputStream logger = new FileOutputStream(getLogFile());
            listener = new StreamBuildListener(logger, Charset.defaultCharset());
            listener.started(getCauses());
            RunListener.fireStarted(this, listener);
            updateSymlinks(listener);
            FlowDefinition definition = getParent().getDefinition();
            if (definition == null) {
View Full Code Here

            while (!completed.get()) {
                if (jenkins == null || jenkins.isTerminating()) {
                    LOGGER.log(Level.FINE, "shutting down, breaking waitForCompletion on {0}", this);
                    // Stop writing content, in case a new set of objects gets loaded after in-VM restart and starts writing to the same file:
                    listener.closeQuietly();
                    listener = new StreamBuildListener(new NullStream());
                    break;
                }
                try {
                    completed.wait(1000);
                } catch (InterruptedException x) {
View Full Code Here

            executionPromise.set(execution);
            if (!execution.isComplete()) {
                // we've been restarted while we were running. let's get the execution going again.
                try {
                    OutputStream logger = new FileOutputStream(getLogFile(), true);
                    listener = new StreamBuildListener(logger, Charset.defaultCharset());
                    listener.getLogger().println("Resuming build");
                } catch (IOException x) {
                    LOGGER.log(Level.WARNING, null, x);
                    listener = new StreamBuildListener(new NullStream());
                }
                completed = new AtomicBoolean();
                Queue.getInstance().schedule(new AfterRestartTask(this), 0);
            }
        }
View Full Code Here

        }

        listener.getLogger().println("Publishing rails " + task + " report...");

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        BuildListener stringListener = new StreamBuildListener(out);

        if (rake.perform(build, launcher, stringListener)) {
            buildAction(out, build);
        } else {
            return fail(build, listener, stringListener.toString());
        }

        return true;
    }
View Full Code Here

TOP

Related Classes of hudson.model.StreamBuildListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.