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 -
Method Summary
Modifier and TypeMethodDescriptionabstract 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.Property<Boolean>abstract org.gradle.api.provider.Property<Boolean>abstract org.gradle.api.provider.Property<String>abstract org.gradle.api.provider.Property<String>voidLaunches 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, usesServiceMethods 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, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
TestServerTask
public TestServerTask()
-
-
Method Details
-
getRootDir
- Returns:
- root directory of the plugin project, used as the working directory for the spawned Gradle process
-
getGradleExecutable
- Returns:
- path to the
gradlewexecutable to invoke for the nested build
-
getJavaHome
- Returns:
- path to the JDK passed to the spawned Gradle via
-Dorg.gradle.java.home
-
getInitScripts
- Returns:
- init scripts forwarded to the spawned Gradle via
--init-script
-
getIncludedBuilds
- Returns:
- composite-build inclusions forwarded via
--include-build
-
getOffline
- Returns:
trueto pass--offlineto the spawned Gradle
-
getBuildCacheEnabled
- Returns:
trueto pass--build-cacheto the spawned Gradle
-
getRefreshDependencies
- Returns:
trueto pass--refresh-dependenciesto the spawned Gradle
-
getContinueOnFailure
- Returns:
trueto pass--continueto the spawned Gradle
-
getParallelExecution
- Returns:
trueto pass--parallelto the spawned Gradle
-
getProfile
- Returns:
trueto pass--profileto the spawned Gradle
-
getRerunTasks
- Returns:
trueto pass--rerun-tasksto the spawned Gradle
-
getDryRun
- Returns:
trueto pass--dry-runto the spawned Gradle
-
getSystemProperties
- Returns:
- system properties forwarded as
-Dkey=valueto the spawned Gradle, excluding internal ones
-
getProjectProperties
- Returns:
- project properties forwarded as
-Pkey=valueto the spawned Gradle, excluding internal ones
-
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.
-