use of org.commonjava.indy.model.core.HostedRepository in project indy by Commonjava.
the class AbstractPromotionManagerTest method createTarget.
protected ArtifactStore createTarget(String changelog) throws Exception {
HostedRepository target = new HostedRepository(MavenPackageTypeDescriptor.MAVEN_PKG_KEY, "target");
client.stores().create(target, changelog, HostedRepository.class);
return target;
}
use of org.commonjava.indy.model.core.HostedRepository in project indy by Commonjava.
the class AbstractPromotionManagerTest method setupRepos.
@Before
public void setupRepos() throws Exception {
final String changelog = "Setup " + name.getMethodName();
final IndyPromoteClientModule module = client.module(IndyPromoteClientModule.class);
System.out.printf("\n\n\n\nBASE-URL: %s\nPROMOTE-URL: %s\nROLLBACK-URL: %s\n\n\n\n", client.getBaseUrl(), module.promoteUrl(), module.rollbackUrl());
source = new HostedRepository(MavenPackageTypeDescriptor.MAVEN_PKG_KEY, "source");
client.stores().create(source, changelog, HostedRepository.class);
client.content().store(source.getKey(), first, new ByteArrayInputStream("This is a test".getBytes()));
client.content().store(source.getKey(), second, new ByteArrayInputStream("This is a test".getBytes()));
target = createTarget(changelog);
}
use of org.commonjava.indy.model.core.HostedRepository in project indy by Commonjava.
the class GroupNFCEntryClearedOnByPathPromoteTest method setupRepos.
@Before
public void setupRepos() throws IndyClientException {
String message = "test setup";
a = client.stores().create(new HostedRepository(MAVEN_PKG_KEY, HOSTED_A_NAME), message, HostedRepository.class);
b = client.stores().create(new HostedRepository(MAVEN_PKG_KEY, HOSTED_B_NAME), message, HostedRepository.class);
g = client.stores().create(new Group(MAVEN_PKG_KEY, GROUP_G_NAME, a.getKey()), message, Group.class);
client.content().store(b.getKey(), PATH, new ByteArrayInputStream(POM_CONTENT.getBytes()));
}
use of org.commonjava.indy.model.core.HostedRepository in project indy by Commonjava.
the class PromotionManagerTest method prepareHostedRepos.
private void prepareHostedRepos() throws Exception {
source = new HostedRepository(MAVEN_PKG_KEY, "source");
storeManager.storeArtifactStore(source, new ChangeSummary(ChangeSummary.SYSTEM_USER, "test setup"), false, true, new EventMetadata());
target = new HostedRepository(MAVEN_PKG_KEY, "target");
storeManager.storeArtifactStore(target, new ChangeSummary(ChangeSummary.SYSTEM_USER, "test setup"), false, true, new EventMetadata());
}
use of org.commonjava.indy.model.core.HostedRepository in project indy by Commonjava.
the class GroupHostedMetadataRemergedOnPromoteTest method setupRepos.
@Before
public void setupRepos() throws IndyClientException {
String message = "test setup";
a = client.stores().create(new HostedRepository(HOSTED_A_NAME), message, HostedRepository.class);
b = client.stores().create(new HostedRepository(HOSTED_B_NAME), message, HostedRepository.class);
c = client.stores().create(new HostedRepository(HOSTED_C_NAME), message, HostedRepository.class);
g = client.stores().create(new Group(GROUP_G_NAME, a.getKey(), b.getKey()), message, Group.class);
client.content().store(a.getKey(), PATH, new ByteArrayInputStream(REPO_CONTENT_TEMPLATE.replaceAll("%version%", A_VERSION).getBytes()));
client.content().store(b.getKey(), PATH, new ByteArrayInputStream(REPO_CONTENT_TEMPLATE.replaceAll("%version%", B_VERSION).getBytes()));
client.content().store(c.getKey(), PATH, new ByteArrayInputStream(REPO_CONTENT_TEMPLATE.replaceAll("%version%", C_VERSION).getBytes()));
}
Aggregations