Search in sources :

Example 11 with ArtifactArchiver

use of hudson.tasks.ArtifactArchiver in project workflow-cps-plugin by jenkinsci.

the class SnippetizerTest method coreStep.

@Test
public void coreStep() throws Exception {
    ArtifactArchiver aa = new ArtifactArchiver("x.jar");
    aa.setAllowEmptyArchive(true);
    if (ArtifactArchiver.DescriptorImpl.class.isAnnotationPresent(Symbol.class)) {
        st.assertRoundTrip(new CoreStep(aa), "archiveArtifacts allowEmptyArchive: true, artifacts: 'x.jar'");
    } else {
        // TODO 2.x delete
        st.assertRoundTrip(new CoreStep(aa), "step([$class: 'ArtifactArchiver', allowEmptyArchive: true, artifacts: 'x.jar'])");
    }
}
Also used : ArtifactArchiver(hudson.tasks.ArtifactArchiver) CoreStep(org.jenkinsci.plugins.workflow.steps.CoreStep) Test(org.junit.Test)

Example 12 with ArtifactArchiver

use of hudson.tasks.ArtifactArchiver in project promoted-builds-plugin by jenkinsci.

the class KeepBuildForeverActionTest method createFingerprinters.

private List<Recorder> createFingerprinters() {
    Recorder r1 = new ArtifactArchiver("*", null, false);
    Recorder r2 = new Fingerprinter("", true);
    return Arrays.asList(r1, r2);
}
Also used : ArtifactArchiver(hudson.tasks.ArtifactArchiver) Fingerprinter(hudson.tasks.Fingerprinter) Recorder(hudson.tasks.Recorder)

Aggregations

ArtifactArchiver (hudson.tasks.ArtifactArchiver)12 Test (org.junit.Test)9 FreeStyleProject (hudson.model.FreeStyleProject)8 FreeStyleBuild (hudson.model.FreeStyleBuild)4 Run (hudson.model.Run)4 Shell (hudson.tasks.Shell)4 FilePath (hudson.FilePath)3 Launcher (hudson.Launcher)3 BuildListener (hudson.model.BuildListener)3 IOException (java.io.IOException)3 List (java.util.List)3 TestBuilder (org.jvnet.hudson.test.TestBuilder)3 Fingerprinter (hudson.tasks.Fingerprinter)2 Recorder (hudson.tasks.Recorder)2 Map (java.util.Map)2 WorkflowRun (org.jenkinsci.plugins.workflow.job.WorkflowRun)2 ImmutableList (com.google.common.collect.ImmutableList)1 DownstreamPassCondition (hudson.plugins.promoted_builds.conditions.DownstreamPassCondition)1 GlobalMatrixAuthorizationStrategy (hudson.security.GlobalMatrixAuthorizationStrategy)1 HudsonPrivateSecurityRealm (hudson.security.HudsonPrivateSecurityRealm)1