Package hudson.plugins.emailext

Examples of hudson.plugins.emailext.ExtendedEmailPublisher


                "jenkins",
                "jenkins.model",
                "hudson",
                "hudson.model"));

        ExtendedEmailPublisher publisher = build.getProject().getPublishersList().get(ExtendedEmailPublisher.class);
        if (publisher.getDescriptor().isSecurityEnabled()) {
            cc.addCompilationCustomizers(new SandboxTransformer());
            sandbox = new ScriptSandbox();
        }

        Binding binding = new Binding();
        binding.setVariable("build", build);
        binding.setVariable("project", build.getParent());
        binding.setVariable("rooturl", publisher.getDescriptor().getHudsonUrl());
        binding.setVariable("out", listener.getLogger());
       
        GroovyShell shell = new GroovyShell(cl, binding, cc);

        if (sandbox != null) {
View Full Code Here


    public String evaluate(AbstractBuild<?, ?> context, TaskListener listener, String macroName)
            throws MacroEvaluationException, IOException, InterruptedException {
        // JENKINS-6193 - Only override the global URL if we should override global settings
        String jenkinsUrl = Jenkins.getInstance().getRootUrl();
       
        ExtendedEmailPublisher publisher = context.getProject().getPublishersList().get(ExtendedEmailPublisher.class);
       
        if (publisher.getDescriptor().getOverrideGlobalSettings()) {
            jenkinsUrl = publisher.getDescriptor().getHudsonUrl();
        }

        if (jenkinsUrl == null) {
            return "";
        }
View Full Code Here

        scriptContent = new ScriptContent();
        listener = StreamTaskListener.fromStdout();
       
        JenkinsLocationConfiguration.get().setUrl("http://localhost");

        publisher = new ExtendedEmailPublisher();
        publisher.defaultContent = "For only 10 easy payment of $69.99 , AWESOME-O 4000 can be yours!";
        publisher.defaultSubject = "How would you like your very own AWESOME-O 4000?";
        publisher.recipientList = "ashlux@gmail.com";
       
        Field f = ExtendedEmailPublisherDescriptor.class.getDeclaredField( "defaultBody" );
View Full Code Here

TOP

Related Classes of hudson.plugins.emailext.ExtendedEmailPublisher

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.