-
-
Notifications
You must be signed in to change notification settings - Fork 126
[JENKINS-49635] Support new VirtualFile.toExternalURL API #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
5fb3d84
7562986
6ba60da
75b73bf
a2abb37
781d409
d323514
b3a8a3c
a01cdb6
c072ff8
f44835b
3959063
d19b231
ce7a8ac
2170267
d2bd052
c9d28b0
af6af8d
f9f8b16
c660832
eed2d6f
ae43469
5d47212
d5baf3a
2e4d5d0
5882dbd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,26 @@ | ||
| package org.jenkinsci.plugins.workflow.steps; | ||
|
|
||
| import java.util.Arrays; | ||
| import jenkins.model.ArtifactManagerConfiguration; | ||
| import jenkins.util.VirtualFile; | ||
| import org.apache.commons.io.IOUtils; | ||
| import org.apache.commons.lang.StringUtils; | ||
| import org.jenkinsci.plugins.workflow.DirectArtifactManagerFactory; | ||
| import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition; | ||
| import org.jenkinsci.plugins.workflow.job.WorkflowJob; | ||
| import org.jenkinsci.plugins.workflow.job.WorkflowRun; | ||
| import org.junit.Assert; | ||
| import static org.junit.Assert.*; | ||
| import org.junit.ClassRule; | ||
| import org.junit.Rule; | ||
| import org.junit.Test; | ||
| import org.jvnet.hudson.test.BuildWatcher; | ||
| import org.jvnet.hudson.test.Issue; | ||
| import org.jvnet.hudson.test.JenkinsRule; | ||
|
|
||
| /** | ||
| * @author Kohsuke Kawaguchi | ||
| */ | ||
| public class ArtifactArchiverStepTest extends Assert { | ||
| public class ArtifactArchiverStepTest { | ||
|
|
||
| @ClassRule public static BuildWatcher watcher = new BuildWatcher(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this used for?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just so that the test log includes the log from the build run at line 90. |
||
|
|
||
| @Rule public JenkinsRule j = new JenkinsRule(); | ||
|
|
||
| /** | ||
|
|
@@ -74,5 +78,15 @@ public void archive() throws Exception { | |
| j.assertLogContains("one/two", b); | ||
| } | ||
|
|
||
| } | ||
| @Issue("JENKINS-49635") | ||
| @Test | ||
| public void directDownload() throws Exception { | ||
| ArtifactManagerConfiguration.get().getArtifactManagerFactories().add(new DirectArtifactManagerFactory()); | ||
| j.createSlave("remote1", null, null); | ||
| j.createSlave("remote2", null, null); | ||
| WorkflowJob p = j.jenkins.createProject(WorkflowJob.class, "p"); | ||
| p.setDefinition(new CpsFlowDefinition("node('remote1') {writeFile file: 'x', text: 'contents'; archiveArtifacts 'x'}; node('remote2') {unarchive mapping: [x: 'x']; echo(/loaded ${readFile('x')}/)}", true)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, because that behavior is not being defined in this PR—it would be overridden in the plugin providing the |
||
| j.assertLogContains("loaded contents", j.buildAndAssertSuccess(p)); | ||
| } | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not binary compatible, needs to be Restricted at least