public class PlansControl extends BackdoorControl<PlansControl>
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
Modifier and Type | Field and Description |
---|---|
static com.atlassian.pageobjects.elements.query.Poller.WaitTimeout |
DEFAULT_BUILD_WAIT_TIMEOUT |
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
Constructor and Description |
---|
PlansControl(BambooEnvironmentData environmentData) |
Modifier and Type | Method and Description |
---|---|
PlansControl |
addCustomRequirement(PlanKey jobKey,
String requirementKey) |
PlansControl |
addPlanVariable(PlanKey planKey,
String variableName,
String variableValue) |
RestPlan |
clonePlan(PlanKey planKeyToClone,
PlanKey newPlanKey)
Clone plan
|
PlansControl |
createArtifact(PlanKey producerJobKey,
Consumer<TestArtifactDetails.Builder> consumer) |
RestPlanBranch |
createBranch(PlanKey planKey,
String vcsBranch,
String branchName) |
PlanKey |
createPlan(TestBuildDetails buildDetails) |
RestProject |
createProject(String projectKey,
String projectName) |
PlansControl |
deleteAllPlans()
Marks all top level plans as deleted.
|
void |
deleteBuildResult(PlanResultKey planResultKey) |
PlansControl |
deletePlan(PlanKey planKey)
Delete plan
|
PlansControl |
deletePlanQuietly(PlanKey planKey)
Delete plan quietly
|
void |
deleteProject(String projectKey) |
PlansControl |
disablePlan(PlanKey planKey)
Disable plan
|
boolean |
doesPlanExistAsRecord(PlanKey planKey) |
PlansControl |
enablePlan(PlanKey planKey)
Enable plan
|
RestBranches |
getAllBranches(PlanKey key)
Get all branches for chain
|
RestPlanBranch |
getBranchByName(PlanKey key,
String branchName)
Get branches with given name for chain
|
com.atlassian.pageobjects.elements.query.TimedQuery<RestPlanBranch> |
getBranchByNameTimed(PlanKey key,
String branchName)
Get branches with given name for chain as a timed query
|
Result |
getBuildResult(PlanKey planKey,
int buildNumber)
Get build result
|
Result |
getBuildResult(PlanResultKey planResultKey)
Get build result
|
List<RestJob> |
getJobs(PlanKey planKey) |
long |
getPlanId(PlanKey key) |
String |
getPlanRootArtifactDirectory(PlanKey planKey)
Get the plan directory information for the plan
|
List<RestVariableDefinition> |
getPlanVariables(PlanKey planKey) |
List<RestRequirement> |
getRequirementsForJob(PlanKey jobKey) |
RestStageList |
getStages(PlanKey planKey) |
void |
tearDown()
Cleanup resources
|
void |
triggerBackgroundDeletionAndWait()
Trigger background plan deletion and wait up to 30s for its completion.
|
TriggerPlanBuilder |
triggerBuild() |
PlansControl |
triggerBuild(PlanKey planKey)
Trigger build
|
PlansControl |
triggerBuild(PlanKey planKey,
Map<String,String> params)
Trigger build
|
PlansControl |
triggerBuildAndAwaitCompletion(PlanKey planKey)
Trigger build and wait for the completion
|
PlansControl |
triggerBuildAndAwaitCompletion(PlanKey planKey,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
Trigger build and wait for the completion
|
PlansControl |
triggerBuildAndAwaitFailure(PlanKey planKey,
int expectStatusCode) |
PlansControl |
triggerBuildAndAwaitSuccess(PlanKey planKey) |
RestQueuedBuild |
triggerBuildWithResponse(PlanKey planKey,
Map<String,String> parameters)
package scope so TriggerPlanBuilder can use it
|
io.restassured.path.json.JsonPath |
waitForBuildWithResponse(PlanResultKey key,
org.hamcrest.Matcher<io.restassured.path.json.JsonPath> matcher,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
PlansControl |
waitForCompletedBuild(PlanKey planKey,
int buildNumber)
Waits for a build that is completed (builds stopped are not included)
|
PlansControl |
waitForCompletedBuild(PlanKey planKey,
int buildNumber,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout waitTimeout) |
PlansControl |
waitForCompletedBuild(PlanResultKey key)
Wait for a build to complete
|
PlansControl |
waitForCompletedBuild(PlanResultKey key,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
io.restassured.path.json.JsonPath |
waitForCompletedBuildWithResponse(PlanResultKey key,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
PlansControl |
waitForFailedBuild(PlanKey planKey,
int buildNumber) |
PlansControl |
waitForFailedBuild(PlanResultKey planResultKey) |
PlansControl |
waitForFailedBuild(PlanResultKey planResultKey,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
PlansControl |
waitForFinishedBuild(PlanKey planKey,
int buildNumber)
Wait until build is finished (either completed or stopped)
|
PlansControl |
waitForFinishedBuild(PlanResultKey key)
Wait until build is finished (either completed or stopped)
|
PlansControl |
waitForQueuedBuild(PlanResultKey key) |
PlansControl |
waitForQueuedBuild(PlanResultKey key,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
PlansControl |
waitForQueuedOrStartedBuild(PlanResultKey key,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
PlansControl |
waitForStartedBuild(PlanKey planKey,
int buildNumber) |
PlansControl |
waitForStartedBuild(PlanResultKey key) |
PlansControl |
waitForStartedBuild(PlanResultKey key,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
PlansControl |
waitForSuccessfulBuild(PlanKey planKey,
int buildNumber) |
PlansControl |
waitForSuccessfulBuild(PlanResultKey planResultKey) |
PlansControl |
waitForSuccessfulBuild(PlanResultKey planResultKey,
com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout) |
client, createResource, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot
public static final com.atlassian.pageobjects.elements.query.Poller.WaitTimeout DEFAULT_BUILD_WAIT_TIMEOUT
public PlansControl(@NotNull BambooEnvironmentData environmentData)
public boolean doesPlanExistAsRecord(@NotNull PlanKey planKey)
public PlansControl deletePlan(@NotNull PlanKey planKey)
planKey
- key of a Planpublic PlansControl deletePlanQuietly(@NotNull PlanKey planKey)
planKey
- key of a Planpublic PlansControl enablePlan(@NotNull PlanKey planKey)
planKey
- key of a Planpublic PlansControl disablePlan(@NotNull PlanKey planKey)
planKey
- key of a Planpublic PlansControl deleteAllPlans()
triggerBackgroundDeletionAndWait()
afterwards.public void triggerBackgroundDeletionAndWait()
public RestPlanBranch getBranchByName(PlanKey key, String branchName) throws Exception
Exception
public com.atlassian.pageobjects.elements.query.TimedQuery<RestPlanBranch> getBranchByNameTimed(PlanKey key, String branchName) throws Exception
Exception
public RestBranches getAllBranches(PlanKey key) throws Exception
Exception
public RestPlanBranch createBranch(PlanKey planKey, String vcsBranch, String branchName)
public RestPlan clonePlan(PlanKey planKeyToClone, PlanKey newPlanKey) throws Exception
Exception
public TriggerPlanBuilder triggerBuild()
public PlansControl triggerBuild(PlanKey planKey)
planKey
- which will be triggeredpublic PlansControl triggerBuildAndAwaitFailure(PlanKey planKey, int expectStatusCode)
public PlansControl triggerBuild(PlanKey planKey, Map<String,String> params)
planKey
- which will be triggeredparams
- additional params to be passed to the buildpublic RestQueuedBuild triggerBuildWithResponse(PlanKey planKey, Map<String,String> parameters)
public PlansControl triggerBuildAndAwaitCompletion(PlanKey planKey)
planKey
- key of the plan to triggerpublic PlansControl triggerBuildAndAwaitCompletion(PlanKey planKey, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
planKey
- key of the plan to triggerpublic Result getBuildResult(PlanResultKey planResultKey) throws Exception
Exception
public Result getBuildResult(PlanKey planKey, int buildNumber) throws Exception
Exception
public PlansControl triggerBuildAndAwaitSuccess(@NotNull PlanKey planKey)
public PlansControl waitForSuccessfulBuild(@NotNull PlanResultKey planResultKey)
public PlansControl waitForSuccessfulBuild(@NotNull PlanKey planKey, int buildNumber)
public PlansControl waitForSuccessfulBuild(@NotNull PlanResultKey planResultKey, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
public PlansControl waitForFailedBuild(@NotNull PlanResultKey planResultKey)
public PlansControl waitForFailedBuild(@NotNull PlanKey planKey, int buildNumber)
public PlansControl waitForFailedBuild(@NotNull PlanResultKey planResultKey, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
public PlansControl waitForCompletedBuild(PlanResultKey key)
key
- plan result keypublic PlansControl waitForCompletedBuild(PlanResultKey key, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
AssertionError
- if build is not completedpublic io.restassured.path.json.JsonPath waitForCompletedBuildWithResponse(PlanResultKey key, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
AssertionError
- if build is not completedpublic PlansControl waitForCompletedBuild(PlanKey planKey, int buildNumber)
public PlansControl waitForCompletedBuild(PlanKey planKey, int buildNumber, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout waitTimeout)
public PlansControl waitForStartedBuild(PlanKey planKey, int buildNumber)
@NotNull public PlansControl waitForStartedBuild(PlanResultKey key)
@NotNull public PlansControl waitForStartedBuild(PlanResultKey key, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
@NotNull public PlansControl waitForQueuedBuild(PlanResultKey key)
@NotNull public PlansControl waitForQueuedBuild(PlanResultKey key, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
@NotNull public PlansControl waitForQueuedOrStartedBuild(PlanResultKey key, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
public PlansControl waitForFinishedBuild(PlanKey planKey, int buildNumber)
public PlansControl waitForFinishedBuild(PlanResultKey key)
public io.restassured.path.json.JsonPath waitForBuildWithResponse(PlanResultKey key, org.hamcrest.Matcher<io.restassured.path.json.JsonPath> matcher, com.atlassian.pageobjects.elements.query.Poller.WaitTimeout timeout)
public RestStageList getStages(PlanKey planKey) throws Exception
Exception
public PlanKey createPlan(TestBuildDetails buildDetails) throws Exception
Exception
public void tearDown()
BackdoorControl
tearDown
in class BackdoorControl<PlansControl>
public void deleteBuildResult(@NotNull PlanResultKey planResultKey) throws Exception
Exception
@NotNull public List<RestVariableDefinition> getPlanVariables(@NotNull PlanKey planKey)
public PlansControl addPlanVariable(PlanKey planKey, String variableName, String variableValue)
public PlansControl createArtifact(PlanKey producerJobKey, Consumer<TestArtifactDetails.Builder> consumer)
public String getPlanRootArtifactDirectory(PlanKey planKey)
planKey
- public PlansControl addCustomRequirement(@NotNull PlanKey jobKey, @NotNull String requirementKey)
public List<RestRequirement> getRequirementsForJob(@NotNull PlanKey jobKey)
public RestProject createProject(String projectKey, String projectName)
public void deleteProject(String projectKey)
public long getPlanId(PlanKey key)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.