From 236e0a6baa1284fba18d42230db0d1a976e12687 Mon Sep 17 00:00:00 2001 From: gabriel giovanini <1408882-gabrielgio@users.noreply.gitlab.com> Date: Sat, 22 Aug 2020 14:34:03 +0000 Subject: Remove this atlassian thrash --- bamboo-specs/.gitignore | 28 ---------- bamboo-specs/.hgignore | 30 ----------- bamboo-specs/src/main/java/tutorial/PlanSpec.java | 62 ---------------------- .../src/test/java/tutorial/PlanSpecTest.java | 15 ------ 4 files changed, 135 deletions(-) delete mode 100644 bamboo-specs/.gitignore delete mode 100644 bamboo-specs/.hgignore delete mode 100644 bamboo-specs/src/main/java/tutorial/PlanSpec.java delete mode 100644 bamboo-specs/src/test/java/tutorial/PlanSpecTest.java diff --git a/bamboo-specs/.gitignore b/bamboo-specs/.gitignore deleted file mode 100644 index 5498b54..0000000 --- a/bamboo-specs/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -.credentials - -### Maven -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties - -### Java -# Compiled class file -*.class - -# Log file -*.log - -# Package Files # -*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -### Idea -.idea/ -*.iml diff --git a/bamboo-specs/.hgignore b/bamboo-specs/.hgignore deleted file mode 100644 index 715f023..0000000 --- a/bamboo-specs/.hgignore +++ /dev/null @@ -1,30 +0,0 @@ -syntax: glob - -.credentials - -### Maven -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties - -### Java -# Compiled class file -*.class - -# Log file -*.log - -# Package Files # -*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -### Idea -.idea/ -*.iml 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: https://confluence.atlassian.com/display/BAMBOO/Bamboo+Specs - */ -@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")))); - } - - -} diff --git a/bamboo-specs/src/test/java/tutorial/PlanSpecTest.java b/bamboo-specs/src/test/java/tutorial/PlanSpecTest.java deleted file mode 100644 index 0c05f55..0000000 --- a/bamboo-specs/src/test/java/tutorial/PlanSpecTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package tutorial; - -import com.atlassian.bamboo.specs.api.builders.plan.Plan; -import com.atlassian.bamboo.specs.api.exceptions.PropertiesValidationException; -import com.atlassian.bamboo.specs.api.util.EntityPropertiesBuilders; -import org.junit.Test; - -public class PlanSpecTest { - @Test - public void checkYourPlanOffline() throws PropertiesValidationException { - Plan plan = new PlanSpec().createPlan(); - - EntityPropertiesBuilders.build(plan); - } -} -- cgit v1.2.3