add planRepositories config
This commit is contained in:
parent
b5deb7b292
commit
2fe4a75a57
@ -2,6 +2,7 @@ package buildjob;
|
|||||||
|
|
||||||
import com.atlassian.bamboo.specs.api.BambooSpec;
|
import com.atlassian.bamboo.specs.api.BambooSpec;
|
||||||
import com.atlassian.bamboo.specs.api.builders.BambooKey;
|
import com.atlassian.bamboo.specs.api.builders.BambooKey;
|
||||||
|
import com.atlassian.bamboo.specs.api.builders.applink.ApplicationLink;
|
||||||
import com.atlassian.bamboo.specs.api.builders.docker.DockerConfiguration;
|
import com.atlassian.bamboo.specs.api.builders.docker.DockerConfiguration;
|
||||||
import com.atlassian.bamboo.specs.api.builders.permission.PermissionType;
|
import com.atlassian.bamboo.specs.api.builders.permission.PermissionType;
|
||||||
import com.atlassian.bamboo.specs.api.builders.permission.Permissions;
|
import com.atlassian.bamboo.specs.api.builders.permission.Permissions;
|
||||||
@ -13,6 +14,7 @@ import com.atlassian.bamboo.specs.api.builders.plan.Stage;
|
|||||||
import com.atlassian.bamboo.specs.api.builders.plan.branches.BranchCleanup;
|
import com.atlassian.bamboo.specs.api.builders.plan.branches.BranchCleanup;
|
||||||
import com.atlassian.bamboo.specs.api.builders.plan.branches.PlanBranchManagement;
|
import com.atlassian.bamboo.specs.api.builders.plan.branches.PlanBranchManagement;
|
||||||
import com.atlassian.bamboo.specs.api.builders.project.Project;
|
import com.atlassian.bamboo.specs.api.builders.project.Project;
|
||||||
|
import com.atlassian.bamboo.specs.builders.repository.bitbucket.server.BitbucketServerRepository;
|
||||||
import com.atlassian.bamboo.specs.builders.task.CheckoutItem;
|
import com.atlassian.bamboo.specs.builders.task.CheckoutItem;
|
||||||
import com.atlassian.bamboo.specs.builders.task.InjectVariablesTask;
|
import com.atlassian.bamboo.specs.builders.task.InjectVariablesTask;
|
||||||
import com.atlassian.bamboo.specs.builders.task.ScriptTask;
|
import com.atlassian.bamboo.specs.builders.task.ScriptTask;
|
||||||
@ -134,7 +136,7 @@ public class PlanSpec {
|
|||||||
new Stage("License Stage")
|
new Stage("License Stage")
|
||||||
.jobs(
|
.jobs(
|
||||||
new Job("License Job", new BambooKey("LICENSE"))
|
new Job("License Job", new BambooKey("LICENSE"))
|
||||||
.enabled(false)
|
.enabled(true)
|
||||||
.tasks(
|
.tasks(
|
||||||
new VcsCheckoutTask()
|
new VcsCheckoutTask()
|
||||||
.description("Checkout default repository.")
|
.description("Checkout default repository.")
|
||||||
@ -151,7 +153,19 @@ public class PlanSpec {
|
|||||||
"/usr/share/maven/ref/settings.xml")
|
"/usr/share/maven/ref/settings.xml")
|
||||||
.volume("/var/run/docker.sock",
|
.volume("/var/run/docker.sock",
|
||||||
"/var/run/docker.sock"))))
|
"/var/run/docker.sock"))))
|
||||||
.linkedRepositories("RR / " + SERVICE_NAME)
|
// .linkedRepositories("RR / " + SERVICE_NAME)
|
||||||
|
.planRepositories(new BitbucketServerRepository()
|
||||||
|
.name("pyinfra")
|
||||||
|
.server(new ApplicationLink()
|
||||||
|
.name("bitbucket-server"))
|
||||||
|
.projectKey("RED")
|
||||||
|
.repositorySlug(SERVICE_NAME)
|
||||||
|
.branch("master")
|
||||||
|
.lfsEnabled(true)
|
||||||
|
.shallowClonesEnabled(true)
|
||||||
|
.fetchWholeRepository(false)
|
||||||
|
.remoteAgentCacheEnabled(false))
|
||||||
|
)
|
||||||
.triggers(new BitbucketServerTrigger())
|
.triggers(new BitbucketServerTrigger())
|
||||||
.planBranchManagement(
|
.planBranchManagement(
|
||||||
new PlanBranchManagement()
|
new PlanBranchManagement()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user