Search in sources :

Example 1 with CoreStep

use of org.jenkinsci.plugins.workflow.steps.CoreStep 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)

Aggregations

ArtifactArchiver (hudson.tasks.ArtifactArchiver)1 CoreStep (org.jenkinsci.plugins.workflow.steps.CoreStep)1 Test (org.junit.Test)1