Class JobDslBuildStep
java.lang.Object
org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
org.jenkinsci.test.acceptance.po.PageAreaImpl
org.jenkinsci.test.acceptance.po.AbstractStep
org.jenkinsci.test.acceptance.plugins.job_dsl.JobDslBuildStep
- All Implemented Interfaces:
BuildStep
,CapybaraPortingLayer
,Control.Owner
,PageArea
,Step
Encapsulates the PageArea of the Job DSL plugin.
- Author:
- Maximilian Oeckler
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
CapybaraPortingLayerImpl.Finder<R>, CapybaraPortingLayerImpl.Resolver
-
Field Summary
Fields inherited from class org.jenkinsci.test.acceptance.po.AbstractStep
parent
Fields inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
driver, injector, LABEL_TO_INPUT_XPATH, time
Fields inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
by
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Click the radiobutton lookOnFilesystem.void
Click the radiobutton useScriptText.String[]
Get the additional classpath entries for the Job DSL scripts.Determines the context to use for relative job names.Determines what to do when a previously generated config file is not referenced anymore.Determines what to do when a previously generated job is not referenced anymore.Determines what to do when a previously generated view is not referenced anymore.Get the DSL script.String[]
Get the DSL scripts, that are located in the workspace.boolean
Determines if the build will be marked as failed when a plugin must be installed or updated to support all features used in the DSL scripts.boolean
Determines if previously generated jobs or views will be ignored.boolean
Determines if missing DSL scripts will be ignored.boolean
Determines whether checkbox ignoreMissingFiles exists on the current page.boolean
Determines whether to look on filesystem for DSL scripts.boolean
Determines if the build will be marked as unstable when using deprecated features.boolean
Determines if the DSL scripts run in a sandbox with limited abilities.boolean
Determines if the provided DSL script should be used.void
setAdditionalClasspath
(String... classpaths) Newline separated list of additional classpath entries for the Job DSL scripts.void
setFailOnMissingPlugin
(boolean fail) Decides if the build will be marked as failed when a plugin must be installed or updated to support all features used in the DSL scripts.void
setIgnoreExisting
(boolean ignore) Decides if previously generated jobs or views will be ignored.void
setIgnoreMissingFiles
(boolean ignore) Decides if missing DSL scripts will be ignored.void
setLookupStrategy
(JobDslLookupStrategy strategy) Set the context to use for relative job names.void
Set what to do when a previously generated config file is not referenced anymore.void
Set what to do when a previously generated job is not referenced anymore.void
Set what to do when a previously generated view is not referenced anymore.void
Set the DSL script.void
setScriptTargetsOnFilesystem
(String... targets) Add a newline separated list of DSL scripts.void
setUnstableOnDeprecation
(boolean unstable) Decides if the build will be marked as unstable when using deprecated features.void
setUseSandbox
(boolean use) Decides if the DSL scripts run in a sandbox with limited abilities.Methods inherited from class org.jenkinsci.test.acceptance.po.PageAreaImpl
control, control, createPageArea, getPage, getPath, getPath, getPath, path, self
Methods inherited from class org.jenkinsci.test.acceptance.po.CapybaraPortingLayerImpl
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, elasticSleep, executeScript, fillIn, find, findCaption, findCaption, findIfNotVisible, getCurrentUrl, getCurrentUrlWithFragment, getElement, getPageContent, getPageSource, getPageSource, getPath, handleAlert, isHiddenOrStale, isStale, last, lastIfNotVisible, newInstance, resource, runThenConfirmAlert, runThenConfirmAlert, runThenHandleAlert, runThenHandleAlert, runThenHandleDialog, sleep, visit, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jenkinsci.test.acceptance.po.CapybaraPortingLayer
all, blur, check, check, check, choose, clickButton, clickLink, confirmAlert, executeScript, fillIn, find, findIfNotVisible, getElement, getPageSource, last, lastIfNotVisible, runThenConfirmAlert, waitFor, waitFor, waitFor, waitFor, waitFor, waitForCond, waitForCond
-
Constructor Details
-
JobDslBuildStep
-
-
Method Details
-
setScript
Set the DSL script.- Parameters:
dslScript
- DSL Script, which is groovy code.
-
getScript
Get the DSL script.- Returns:
- the DSL script.
-
setScriptTargetsOnFilesystem
Add a newline separated list of DSL scripts.- Parameters:
targets
- The DSL scripts, located in the Workspace.
-
getScriptTargetsOnFilesystem
Get the DSL scripts, that are located in the workspace.- Returns:
- an array of DSL scripts.
-
clickUseScriptText
public void clickUseScriptText()Click the radiobutton useScriptText. -
isUseScriptText
public boolean isUseScriptText()Determines if the provided DSL script should be used.- Returns:
- TRUE if radiobutton useScriptText is selected
-
clickLookOnFilesystem
public void clickLookOnFilesystem()Click the radiobutton lookOnFilesystem. -
isLookOnFilesystem
public boolean isLookOnFilesystem()Determines whether to look on filesystem for DSL scripts.- Returns:
- TRUE if radiobutton lookOnFilesystem is selected
-
setIgnoreMissingFiles
public void setIgnoreMissingFiles(boolean ignore) Decides if missing DSL scripts will be ignored.- Parameters:
ignore
- build not fail if true
-
isIgnoreMissingFiles
public boolean isIgnoreMissingFiles()Determines if missing DSL scripts will be ignored.- Returns:
- TRUE if checkbox ignoreMissingFiles is selected
-
isIgnoreMissingFilesShown
public boolean isIgnoreMissingFilesShown()Determines whether checkbox ignoreMissingFiles exists on the current page.- Returns:
- TRUE if it exists
-
setUseSandbox
public void setUseSandbox(boolean use) Decides if the DSL scripts run in a sandbox with limited abilities.- Parameters:
use
- Run DSL scripts in a sandbox if true
-
isUseSandbox
public boolean isUseSandbox()Determines if the DSL scripts run in a sandbox with limited abilities.- Returns:
- TRUE if checkbox sandbox is selected
-
setIgnoreExisting
public void setIgnoreExisting(boolean ignore) Decides if previously generated jobs or views will be ignored.- Parameters:
ignore
- leave previous jobs and views as is if true
-
isIgnoreExisting
public boolean isIgnoreExisting()Determines if previously generated jobs or views will be ignored.- Returns:
- TRUE if checkbox ignoreExisting is selected
-
setRemovedJobAction
Set what to do when a previously generated job is not referenced anymore.- Parameters:
action
- The action to select. An Element of the typeJobDslRemovedJobAction
.
-
getRemovedJobAction
Determines what to do when a previously generated job is not referenced anymore.- Returns:
- The selected action for removed jobs. An Element of the type
JobDslRemovedJobAction
.
-
setRemovedViewAction
Set what to do when a previously generated view is not referenced anymore.- Parameters:
action
- The action to select. An element of the typeJobDslRemovedViewAction
.
-
getRemovedViewAction
Determines what to do when a previously generated view is not referenced anymore.- Returns:
- The selected action for removed views. An element of the type
JobDslRemovedViewAction
.
-
setRemovedConfigFilesAction
Set what to do when a previously generated config file is not referenced anymore.- Parameters:
action
- The action to select. An element of the typeJobDslRemovedConfigFilesAction
.
-
getRemovedConfigFilesAction
Determines what to do when a previously generated config file is not referenced anymore.- Returns:
- The selected action for removed config files. An element of the type
JobDslRemovedConfigFilesAction
.
-
setLookupStrategy
Set the context to use for relative job names.- Parameters:
strategy
- The strategy to select. An element of the typeJobDslLookupStrategy
.
-
getLookupStrategy
Determines the context to use for relative job names.- Returns:
- The selected strategy for lookup. An element of the type
JobDslLookupStrategy
.
-
setAdditionalClasspath
Newline separated list of additional classpath entries for the Job DSL scripts. All entries must be relative to the workspace root.- Parameters:
classpaths
- The additional classpaths.
-
getAdditionalClasspath
Get the additional classpath entries for the Job DSL scripts.- Returns:
- an array of additional classpaths.
-
setFailOnMissingPlugin
public void setFailOnMissingPlugin(boolean fail) Decides if the build will be marked as failed when a plugin must be installed or updated to support all features used in the DSL scripts.- Parameters:
fail
- mark build as failed if true
-
isFailOnMissingPlugin
public boolean isFailOnMissingPlugin()Determines if the build will be marked as failed when a plugin must be installed or updated to support all features used in the DSL scripts.- Returns:
- TRUE if checkbox failOnMissingPlugin is selected
-
setUnstableOnDeprecation
public void setUnstableOnDeprecation(boolean unstable) Decides if the build will be marked as unstable when using deprecated features.- Parameters:
unstable
- mark build as unstable if true
-
isUnstableOnDeprecation
public boolean isUnstableOnDeprecation()Determines if the build will be marked as unstable when using deprecated features.- Returns:
- TRUE if checkbox unstableOnDeprecation is selected
-