aboutsummaryrefslogtreecommitdiff
path: root/bamboo-specs/src/main
diff options
context:
space:
mode:
authorgabriel giovanini <1408882-gabrielgio@users.noreply.gitlab.com>2020-08-22 14:34:03 +0000
committergabriel giovanini <1408882-gabrielgio@users.noreply.gitlab.com>2020-08-22 14:34:03 +0000
commit236e0a6baa1284fba18d42230db0d1a976e12687 (patch)
treeed99c146c48bffc854742f5f5bfa402cb93ea703 /bamboo-specs/src/main
parenta99e7be0a6c7c725dc5156952e581bf3a903485c (diff)
downloadgenpass-236e0a6baa1284fba18d42230db0d1a976e12687.tar.gz
genpass-236e0a6baa1284fba18d42230db0d1a976e12687.tar.bz2
genpass-236e0a6baa1284fba18d42230db0d1a976e12687.zip
Remove this atlassian thrash
Diffstat (limited to 'bamboo-specs/src/main')
-rw-r--r--bamboo-specs/src/main/java/tutorial/PlanSpec.java62
1 files changed, 0 insertions, 62 deletions
diff --git a/bamboo-specs/src/main/java/tutorial/PlanSpec.java b/bamboo-specs/src/main/java/tutorial/PlanSpec.java
deleted file mode 100644
index 2350d4a..0000000
--- a/bamboo-specs/src/main/java/tutorial/PlanSpec.java
+++ /dev/null
@@ -1,62 +0,0 @@
-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;
-import com.atlassian.bamboo.specs.api.builders.permission.PlanPermissions;
-
-/**
- * Plan configuration for Bamboo.
- * Learn more on: <a href="https://confluence.atlassian.com/display/BAMBOO/Bamboo+Specs">https://confluence.atlassian.com/display/BAMBOO/Bamboo+Specs</a>
- */
-@BambooSpec
-public class PlanSpec {
-
- /**
- * Run main to publish plan on Bamboo
- */
- public static void main(final String[] args) throws Exception {
- //By default credentials are read from the '.credentials' file.
- BambooServer bambooServer = new BambooServer("http://localhost:8085");
-
- Plan plan = new PlanSpec().createPlan();
-
- bambooServer.publish(plan);
-
- PlanPermissions planPermission = new PlanSpec().createPlanPermission(plan.getIdentifier());
-
- bambooServer.publish(planPermission);
- }
-
- PlanPermissions createPlanPermission(PlanIdentifier planIdentifier) {
- Permissions permission = new Permissions()
- .userPermissions("admin", PermissionType.ADMIN, PermissionType.CLONE, PermissionType.EDIT)
- .groupPermissions("bamboo-admin", PermissionType.ADMIN)
- .loggedInUserPermissions(PermissionType.VIEW)
- .anonymousUserPermissionView();
- return new PlanPermissions(planIdentifier.getProjectKey(), planIdentifier.getPlanKey()).permissions(permission);
- }
-
- Project project() {
- return new Project()
- .name("Project Name")
- .key("PRJ");
- }
-
- Plan createPlan() {
- 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"))));
- }
-
-
-}