use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class ArtifactoryPluginTest method maven_integration.
@Test
@WithPlugins("maven-plugin")
@Ignore
@Issue("JENKINS-66791")
public void maven_integration() {
installSomeMaven(jenkins);
final ArtifactoryContainer artifactory = artifactoryContainer.get();
waitForArtifactory(artifactory);
configureArtifactory(artifactory);
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
job.configure();
job.copyDir(resource("/artifactory_plugin/multimodule/"));
job.goals.set("install");
job.options("-verbose");
ArtifactoryPublisher publisher = job.addPublisher(ArtifactoryPublisher.class);
publisher.refresh();
job.save();
Build build = job.startBuild().shouldSucceed();
String log = build.getConsole();
assertThat(log, containsString("Initializing Artifactory Build-Info Recording"));
assertThat(log, containsString("Deploying artifact"));
assertThat(log, containsRegexp("Deploying build (info|descriptor) to: " + artifactory.getURL() + "/api/build"));
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class CompressArtifactsPluginTest method archiveMavenProject.
@Test
@Issue("JENKINS-27558")
@WithPlugins("maven-plugin")
public void archiveMavenProject() {
MavenInstallation.installSomeMaven(jenkins);
MavenModuleSet mp = jenkins.jobs.create(MavenModuleSet.class);
mp.configure();
mp.copyDir(resource("/maven_plugin/multimodule/"));
mp.goals.set("clean package -B -DskipTests=true");
mp.addPublisher(ArtifactArchiver.class).includes("module_a/**/*");
mp.save();
MavenBuild raw = mp.startBuild().shouldSucceed().as(MavenBuild.class);
CompressingArtifactManager.setup(jenkins);
MavenBuild compressed = mp.startBuild().shouldSucceed().as(MavenBuild.class);
compareArtifacts(raw, compressed);
compareArtifacts(raw.module("gid$root"), compressed.module("gid$root"));
compareArtifacts(raw.module("gid$module_a"), compressed.module("gid$module_a"));
compareArtifacts(raw.module("gid$module_b"), compressed.module("gid$module_b"));
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class MavenPluginTest method set_global_maven_options.
@Test
public void set_global_maven_options() {
installSomeMaven(jenkins);
jenkins.configure();
new MavenProjectConfig(jenkins.getConfigPage()).opts.set("-showversion");
jenkins.save();
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
job.configure();
job.copyDir(resource("/maven_plugin/multimodule/"));
job.goals.set("clean");
job.save();
job.startBuild().shouldSucceed().shouldContainsConsoleOutput(" Runtime Environment ");
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class MavenPluginTest method set_maven_options.
@Test
public void set_maven_options() {
installSomeMaven(jenkins);
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
job.configure();
job.copyDir(resource("/maven_plugin/multimodule/"));
job.goals.set("clean");
job.options("-showversion");
job.save();
job.startBuild().waitUntilFinished().shouldContainsConsoleOutput(" Runtime Environment ");
}
use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.
the class MavenPluginTest method send_mail.
@Test
@Issue({ "JENKINS-20209", "JENKINS-21045" })
public void send_mail() throws Exception {
installSomeMaven(jenkins);
MailhogContainer mailhog = mailhogProvider.get();
MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
job.configure();
Mailer mailer = job.addBuildSettings(Mailer.class);
mailer.recipients.set("root@example.com");
job.save();
job.startBuild().shouldFail();
mailhog.assertMail(Pattern.compile("Build failed in Jenkins: .* #1"), "root@example.com", Pattern.compile(job.name));
}
Aggregations