Class TestServerTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.jenkinsci.gradle.plugins.jpi2.TestServerTask
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

@DisableCachingByDefault(because="starts an external Jenkins process and produces no cacheable outputs") public abstract class TestServerTask extends org.gradle.api.DefaultTask
Task that launches a Jenkins server and terminates after success or first error.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.Namer
  • Field Summary

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.provider.ListProperty<String>
     
    abstract org.gradle.api.provider.ListProperty<String>
     
    abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<PortAllocationService>
     
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.MapProperty<String,String>
     
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.provider.MapProperty<String,String>
     
    void
    Launches a nested Gradle build, streams its output, and fails the task if Jenkins does not report a successful start within the configured timeout.

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, notCompatibleWithConfigurationCache
  • Constructor Details

    • TestServerTask

      public TestServerTask()
  • Method Details

    • getRootDir

      @Input public abstract org.gradle.api.provider.Property<String> getRootDir()
      Returns:
      root directory of the plugin project, used as the working directory for the spawned Gradle process
    • getGradleExecutable

      @Input public abstract org.gradle.api.provider.Property<String> getGradleExecutable()
      Returns:
      path to the gradlew executable to invoke for the nested build
    • getJavaHome

      @Input public abstract org.gradle.api.provider.Property<String> getJavaHome()
      Returns:
      path to the JDK passed to the spawned Gradle via -Dorg.gradle.java.home
    • getInitScripts

      @Input public abstract org.gradle.api.provider.ListProperty<String> getInitScripts()
      Returns:
      init scripts forwarded to the spawned Gradle via --init-script
    • getIncludedBuilds

      @Input public abstract org.gradle.api.provider.ListProperty<String> getIncludedBuilds()
      Returns:
      composite-build inclusions forwarded via --include-build
    • getOffline

      @Input public abstract org.gradle.api.provider.Property<Boolean> getOffline()
      Returns:
      true to pass --offline to the spawned Gradle
    • getBuildCacheEnabled

      @Input public abstract org.gradle.api.provider.Property<Boolean> getBuildCacheEnabled()
      Returns:
      true to pass --build-cache to the spawned Gradle
    • getRefreshDependencies

      @Input public abstract org.gradle.api.provider.Property<Boolean> getRefreshDependencies()
      Returns:
      true to pass --refresh-dependencies to the spawned Gradle
    • getContinueOnFailure

      @Input public abstract org.gradle.api.provider.Property<Boolean> getContinueOnFailure()
      Returns:
      true to pass --continue to the spawned Gradle
    • getParallelExecution

      @Input public abstract org.gradle.api.provider.Property<Boolean> getParallelExecution()
      Returns:
      true to pass --parallel to the spawned Gradle
    • getProfile

      @Input public abstract org.gradle.api.provider.Property<Boolean> getProfile()
      Returns:
      true to pass --profile to the spawned Gradle
    • getRerunTasks

      @Input public abstract org.gradle.api.provider.Property<Boolean> getRerunTasks()
      Returns:
      true to pass --rerun-tasks to the spawned Gradle
    • getDryRun

      @Input public abstract org.gradle.api.provider.Property<Boolean> getDryRun()
      Returns:
      true to pass --dry-run to the spawned Gradle
    • getSystemProperties

      @Input public abstract org.gradle.api.provider.MapProperty<String,String> getSystemProperties()
      Returns:
      system properties forwarded as -Dkey=value to the spawned Gradle, excluding internal ones
    • getProjectProperties

      @Input public abstract org.gradle.api.provider.MapProperty<String,String> getProjectProperties()
      Returns:
      project properties forwarded as -Pkey=value to the spawned Gradle, excluding internal ones
    • getServerTaskPath

      @Input public abstract org.gradle.api.provider.Property<String> getServerTaskPath()
      Returns:
      Gradle task path to run inside the spawned build (e.g. :server)
    • getPortAllocationService

      @Internal public abstract org.gradle.api.provider.Property<PortAllocationService> getPortAllocationService()
      Returns:
      build service that allocates a free TCP port for the Jenkins test server
    • runTestServer

      public void runTestServer()
      Launches a nested Gradle build, streams its output, and fails the task if Jenkins does not report a successful start within the configured timeout.