Class GroovyScript

    • Constructor Detail

      • GroovyScript

        public GroovyScript​(String script,
                            @NonNull
                            Collection<Parameter> parameters,
                            boolean failWithException,
                            TaskListener listener,
                            Launcher launcher,
                            AbstractBuild<?,​?> build)
        This constructor can only be used when the script is executed on the master, because launcher and build can not be transered to a slave and the therefore the execution will fail
        Parameters:
        script - the script to be executed
        parameters - the parameters to be passed to the script
        failWithException - should the job fail with an exception
        listener - access to logging via listener
        launcher - the launcher
        build - the current build
      • GroovyScript

        public GroovyScript​(String script,
                            @NonNull
                            Collection<Parameter> parameters,
                            boolean failWithException,
                            TaskListener listener)
        Constructor
        Parameters:
        script - the script to be executed
        parameters - the parameters to be passed to the script
        failWithException - should the job fail with an exception
        listener - access to logging via listener