From 9f5073eefc158185f23950823499b369c33a00b7 Mon Sep 17 00:00:00 2001 From: gabrielgio Date: Wed, 22 Jul 2020 15:49:47 +0200 Subject: Add simple plan --- bamboo-specs/src/main/java/tutorial/PlanSpec.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bamboo-specs/src/main/java/tutorial') diff --git a/bamboo-specs/src/main/java/tutorial/PlanSpec.java b/bamboo-specs/src/main/java/tutorial/PlanSpec.java index 7dfd5f3..2350d4a 100644 --- a/bamboo-specs/src/main/java/tutorial/PlanSpec.java +++ b/bamboo-specs/src/main/java/tutorial/PlanSpec.java @@ -1,9 +1,12 @@ package tutorial; import com.atlassian.bamboo.specs.api.BambooSpec; +import com.atlassian.bamboo.specs.api.builders.plan.Job; import com.atlassian.bamboo.specs.api.builders.plan.Plan; import com.atlassian.bamboo.specs.api.builders.plan.PlanIdentifier; +import com.atlassian.bamboo.specs.api.builders.plan.Stage; import com.atlassian.bamboo.specs.api.builders.project.Project; +import com.atlassian.bamboo.specs.builders.task.ScriptTask; import com.atlassian.bamboo.specs.util.BambooServer; import com.atlassian.bamboo.specs.api.builders.permission.Permissions; import com.atlassian.bamboo.specs.api.builders.permission.PermissionType; @@ -48,10 +51,11 @@ public class PlanSpec { } Plan createPlan() { - return new Plan( - project(), - "Plan Name", "PLANKEY") - .description("Plan created from (enter repository url of your plan)"); + return new Plan(project(), "Genpass", "GP") + .description("Test using java spec") + .stages(new Stage("Stage 1") + .jobs(new Job("Echo man", "EC") + .tasks(new ScriptTask().inlineBody("echo Hello World")))); } -- cgit v1.2.3