IIRC look in the pipeline-utility-steps plugin.

Cheers

Le 15 oct. 2016 6:55 PM, "Rachel" <[email protected]> a
écrit :

> Hi Jonathan,
>
> I think that utility is not available. Alternatively, it's possible to use
> find command (if Linux):
>
> node {
>    stage 'Create folders in workspace for showing'
>    sh '''#!/bin/bash +x
>          mkdir -p my_folder1/my_subfolder_1.1/my_subfolder_1.1.1
>          mkdir -p my_folder2/my_subfolder_2.1/
>          mkdir -p my_folder3/my_subfolder_3.1/my_subfolder_3.1.1
>          '''
>    stage 'List folders'
>    sh '''#!/bin/bash +x
>          for directory in `find $WORKSPACE -type d -name
> \'my_subfolder_?.?.?*\'`; do
>              echo "$directory found, with parent: $(dirname $directory)"
>          done'''
> }
>
>
> *List folders* stage output:
>
>
> [workspace] Running shell script
> ./my_folder1/my_subfolder_1.1/my_subfolder_1.1.1 found, with parent: 
> ./my_folder1/my_subfolder_1.1
> ./my_folder3/my_subfolder_3.1/my_subfolder_3.1.1 found, with parent: 
> ./my_folder3/my_subfolder_3.1
>
>
> I hope be useful.
>
> Best regards,
> Rachel
>
> El sábado, 15 de octubre de 2016, 14:06:35 (UTC+2), Jonathan Hodgson
> escribió:
>>
>> Hi,
>>
>> I need to find all the folders with a given name which are in my
>> workspace (well in fact I need to find their parent folders)
>>
>> A quick test with findFiles indicates it only finds files, not folders.
>>
> --
> 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 [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/aa307eba-f6c5-47e4-a1eb-cf5a46367101%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/aa307eba-f6c5-47e4-a1eb-cf5a46367101%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 the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6VKjE5zkxLu-PCyurHvjWZEH0fT_Fpu5VycG8fm_%2BKJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to