Good point.  I would rather have it in the Jenkinsfile.  Thanks.

On Fri, Oct 6, 2017 at 5:06 PM, Mark Waite <mark.earl.wa...@gmail.com>
wrote:

>
>
> On Fri, Oct 6, 2017 at 2:24 PM dandeliondodgeball <chris.fo...@3derm.com>
> wrote:
>
>> Did this two different ways in the same workspace.
>> ../workspace/Pipeline01/Artifact/my.zip
>> ../workspace/Pipeline01/clonedRepo/
>>
>> One for the artifact I needed.
>> For this I used an attribute in the CopyArtifact plugin, like this
>> (declarative pipeline):
>> stages {
>>     stage('Copy Archive') {
>>         steps {
>>             script {
>>                 step ([$class: 'CopyArtifact',
>>                 projectName: 'Create_archive',
>>                 filter: "packages/my.zip",
>>                 target: 'Artifact']);
>>
>>
>> And another for the code which was getting cloned.
>> For this I used the "Check out to sub-directory" feature in the git
>> plugin, like this:
>>
>>
>> <https://lh3.googleusercontent.com/-PorSaP02xBQ/Wdflji7qAUI/AAAAAAAAAE4/pDXzJCTkLHQ-HnvRiqZY3DzzlXBjrU2nACLcBGAs/s1600/CheckoutToSubDir.PNG>
>>
>>
>>
>>
> If you use the dir('dest-dir') { checkout scm } syntax, you avoid using
> that special case from the git plugin, and have something that is
> maintained in code (and looks like pipeline), rather than something that
> looks like a special case of the git plugin.
>
> The technique you used (with the git extension) works, but was really
> created to be used with freestyle projects.  Pipeline has a better way to
> do it with the dir() step.
>
> Mark Waite
>
>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/jenkinsci-users/f6b55274-4823-47e3-b1a7-
>> 46892e9d3601%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/f6b55274-4823-47e3-b1a7-46892e9d3601%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jenkinsci-users/ZlxbJHRC2Dg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/CAO49JtG_t7%2BvdWK0P1qovNV5zX7J71UEfoWsCxX
> kHaM8TZH%3D1A%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtG_t7%2BvdWK0P1qovNV5zX7J71UEfoWsCxXkHaM8TZH%3D1A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
<https://www.3derm.com/>
Chris Foran       | Senior Software Engineer
(617) 586-9962 | chris.fo...@3derm.com

101 Huntington Ave, 17th Floor
Suite 1300 c/o 3Derm @ BCBSMA
Boston, MA 02199

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAACcGGUZssPMuxRNe_%2B-oCUuuVp-8hdMWBODKOg9xwOyHYv0bQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to