Search in sources :

Example 1 with ArtifactoryGradleConfiguratior

use of org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryGradleConfiguratior in project acceptance-test-harness by jenkinsci.

the class ArtifactoryPluginTest method gradle_integration.

@Test
@WithPlugins("gradle")
@Ignore
@Issue("JENKINS-39323")
public void gradle_integration() {
    final ArtifactoryContainer artifactory = artifactoryContainer.get();
    waitForArtifactory(artifactory);
    configureArtifactory(artifactory);
    GradleInstallation.installGradle(jenkins, "gradle 2.0", "2.0");
    FreeStyleJob job = jenkins.jobs.create();
    job.copyDir(resource("/artifactory_plugin/quickstart"));
    ArtifactoryGradleConfiguratior gradleConfig = new ArtifactoryGradleConfiguratior(job);
    gradleConfig.refresh();
    GradleStep gradle = job.addBuildStep(GradleStep.class);
    gradle.setVersion("gradle 2.0");
    // gradle.tasks.set("build --stacktrace --debug");
    gradle.setTasks("build");
    job.save();
    Build build = job.startBuild().shouldSucceed();
    String log = build.getConsole();
    assertThat(log, containsString("build artifactoryPublish"));
    assertThat(log, containsString("[buildinfo]"));
    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) GradleStep(org.jenkinsci.test.acceptance.plugins.gradle.GradleStep) ArtifactoryGradleConfiguratior(org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryGradleConfiguratior) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) Matchers.containsString(org.hamcrest.Matchers.containsString) 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 ArtifactoryGradleConfiguratior (org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryGradleConfiguratior)1 GradleStep (org.jenkinsci.test.acceptance.plugins.gradle.GradleStep)1 Build (org.jenkinsci.test.acceptance.po.Build)1 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1 Issue (org.jvnet.hudson.test.Issue)1