Search in sources :

Example 1 with ArtifactoryPublisher

use of org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryPublisher 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"));
}
Also used : ArtifactoryContainer(org.jenkinsci.test.acceptance.docker.fixtures.ArtifactoryContainer) Build(org.jenkinsci.test.acceptance.po.Build) ArtifactoryPublisher(org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryPublisher) Matchers.containsString(org.hamcrest.Matchers.containsString) MavenModuleSet(org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet) Ignore(org.junit.Ignore) Issue(org.jvnet.hudson.test.Issue) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) DockerTest(org.jenkinsci.test.acceptance.junit.DockerTest) WithPlugins(org.jenkinsci.test.acceptance.junit.WithPlugins)

Aggregations

Matchers.containsString (org.hamcrest.Matchers.containsString)1 ArtifactoryContainer (org.jenkinsci.test.acceptance.docker.fixtures.ArtifactoryContainer)1 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 DockerTest (org.jenkinsci.test.acceptance.junit.DockerTest)1 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)1 ArtifactoryPublisher (org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryPublisher)1 MavenModuleSet (org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet)1 Build (org.jenkinsci.test.acceptance.po.Build)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 Issue (org.jvnet.hudson.test.Issue)1