linked repos revert
This commit is contained in:
parent
efb1122f22
commit
d7cf9e4993
@ -19,12 +19,9 @@ import com.atlassian.bamboo.specs.api.builders.project.Project;
|
||||
import com.atlassian.bamboo.specs.builders.repository.git.GitRepository;
|
||||
import com.atlassian.bamboo.specs.builders.task.*;
|
||||
import com.atlassian.bamboo.specs.builders.trigger.BitbucketServerTrigger;
|
||||
import com.atlassian.bamboo.specs.builders.trigger.RepositoryPollingTrigger;
|
||||
import com.atlassian.bamboo.specs.model.task.ScriptTaskProperties;
|
||||
import com.atlassian.bamboo.specs.util.BambooServer;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
@ -65,41 +62,21 @@ public class PlanSpec {
|
||||
.stages(new Stage("Release")
|
||||
.manual(true)
|
||||
.jobs(createRelease()))
|
||||
.triggers(new RepositoryPollingTrigger()
|
||||
.pollEvery(10, TimeUnit.SECONDS))
|
||||
.planRepositories(new GitRepository()
|
||||
.name("redaction-ui")
|
||||
.url("ssh://git@git.iqser.com:2222/red/ui.git")
|
||||
.branch("master")
|
||||
.verboseLogs(true)
|
||||
.remoteAgentCacheEnabled(false)
|
||||
.fetchWholeRepository(true)
|
||||
.shallowClonesEnabled(false)
|
||||
.authentication(new SharedCredentialsIdentifier("bamboo-agent")
|
||||
.scope(SharedCredentialsScope.GLOBAL)))
|
||||
.planRepositories(new GitRepository()
|
||||
.name("common-ui")
|
||||
.url("ssh://git@git.iqser.com:2222/sl/common-ui.git")
|
||||
.branch("master")
|
||||
.verboseLogs(true)
|
||||
.remoteAgentCacheEnabled(false)
|
||||
.fetchWholeRepository(true)
|
||||
.shallowClonesEnabled(false)
|
||||
.authentication(new SharedCredentialsIdentifier("bamboo-agent")
|
||||
.scope(SharedCredentialsScope.GLOBAL)))
|
||||
.linkedRepositories("RED / ui")
|
||||
.linkedRepositories("Shared Libraries / common-ui")
|
||||
.triggers(new BitbucketServerTrigger())
|
||||
.planBranchManagement(new PlanBranchManagement().createForVcsBranch().delete(new BranchCleanup().whenInactiveInRepositoryAfterDays(30)).notificationForCommitters());
|
||||
}
|
||||
|
||||
public Job creatGinCloudPlatformImagesJob(String project) {
|
||||
return new Job("Build Job: " + project, new BambooKey(project.toUpperCase().replaceAll("-", "")))
|
||||
.tasks(
|
||||
new CleanWorkingDirectoryTask().description("My clean working directory task"),
|
||||
new CleanWorkingDirectoryTask().description("My clean working directory task"),
|
||||
// Checkout
|
||||
new VcsCheckoutTask().description("Checkout Common UI Repository")
|
||||
.checkoutItems(new CheckoutItem().repository("common-ui").path("common-ui")).cleanCheckout(true),
|
||||
|
||||
new VcsCheckoutTask().description("Checkout Redaction Repository")
|
||||
.checkoutItems(new CheckoutItem().repository("redaction-ui").path("redaction-ui")),
|
||||
new VcsCheckoutTask().description("Checkout Default Repository")
|
||||
.checkoutItems(new CheckoutItem().defaultRepository().path("redaction-ui")),
|
||||
new VcsCheckoutTask().description("Checkout UI Shared Lib")
|
||||
.checkoutItems(new CheckoutItem().repository("Shared Libraries / common-ui").path("common-ui")),
|
||||
|
||||
// Build
|
||||
new ScriptTask().description("Build")
|
||||
@ -113,9 +90,9 @@ public class PlanSpec {
|
||||
// read version from artifact
|
||||
new InjectVariablesTask().path("redaction-ui/version.properties"),
|
||||
// commit release
|
||||
new VcsCommitTask().commitMessage("chore(release)").repository("redaction-ui"),
|
||||
new VcsCommitTask().commitMessage("chore(release)").repository("RED / ui"),
|
||||
// create tag with this version
|
||||
new VcsTagTask().tagName("${bamboo.inject.APP_VERSION}").repository("redaction-ui")
|
||||
new VcsTagTask().tagName("${bamboo.inject.APP_VERSION}").repository("RED / ui")
|
||||
).dockerConfiguration(
|
||||
new DockerConfiguration().image("nexus.iqser.com:5001/infra/release_build:2.9.1")
|
||||
.volume("/var/lib/docker", "/var/lib/docker")
|
||||
@ -128,9 +105,9 @@ public class PlanSpec {
|
||||
public Job createRelease() {
|
||||
return new Job("Create Release", new BambooKey("CRLS"))
|
||||
.tasks(
|
||||
new CleanWorkingDirectoryTask().description("My clean working directory task"),
|
||||
new CleanWorkingDirectoryTask().description("My clean working directory task"),
|
||||
new VcsCheckoutTask().description("Checkout Default Repository")
|
||||
.checkoutItems(new CheckoutItem().repository("redaction-ui")).cleanCheckout(true),
|
||||
.checkoutItems(new CheckoutItem().defaultRepository()).cleanCheckout(true),
|
||||
|
||||
new ArtifactDownloaderTask().description("Download version artifact")
|
||||
.sourcePlan(new PlanIdentifier("RED", "UI"))
|
||||
@ -141,7 +118,7 @@ public class PlanSpec {
|
||||
new ScriptTask().description("checkout tag").inlineBody("git checkout tags/${bamboo.inject.APP_VERSION}"),
|
||||
|
||||
|
||||
new VcsBranchTask().branchName("release/${bamboo.inject.APP_VERSION}").repository("redaction-ui"))
|
||||
new VcsBranchTask().branchName("release/${bamboo.inject.APP_VERSION}").repository("RED / ui"))
|
||||
.dockerConfiguration(new DockerConfiguration().image("nexus.iqser.com:5001/infra/release_build:2.9.1")
|
||||
.volume("/var/run/docker.sock", "/var/run/docker.sock"));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user