Discussion:
Adding files before zipping (pipeline utility plugin Jenkins)
Faad Sayaou
2018-11-15 17:38:27 UTC
Permalink
Hello,
I currently have a pipeline which zips results of a build stage. I have a
README.md file which i will like to add in my zip file when uploading to
nexus. The file is included during checkout. how do I add this during the
zip stage? I tried the approach below but it doesn't add the readme file in
my final output folder

*zip dir: 'directroy/to/my/folder', glob:'', zipFile: 'folder.zip' +
'path/to/my/readmeFile/README.md'*


Can someone tell me the correct way of doing this?
Thanks
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/42183657-10a2-4b86-b139-dcb7bb0e82f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Stuart Rowe
2018-11-15 18:15:40 UTC
Permalink
Have you tried copying the *README.md* into *directory/to/my/folder* before
calling *zip*?
Post by Faad Sayaou
Hello,
I currently have a pipeline which zips results of a build stage. I have a
README.md file which i will like to add in my zip file when uploading to
nexus. The file is included during checkout. how do I add this during the
zip stage? I tried the approach below but it doesn't add the readme file in
my final output folder
*zip dir: 'directroy/to/my/folder', glob:'', zipFile: 'folder.zip' +
'path/to/my/readmeFile/README.md'*
Can someone tell me the correct way of doing this?
Thanks
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bb0ab981-f85b-4ad9-a6ab-f6693f8e1475%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Faad Sayaou
2018-11-15 18:27:19 UTC
Permalink
hi, so here is the thing. I am currently zipping two projects
*zip dir: 'directroy/to/my/folder1', glob:'', zipFile: 'folder1.zip' *
*zip dir: 'directroy/to/my/folder2', glob:'', zipFile: 'folder2.zip' +
'folder2.zip' + **'path/to/my/readmeFile/README.md'*

zipping two folders works fine as expected. I do not want the readme file
to be inside folder1 nor in folder2. I want a situation where if we
download the zip file,
we should be able to see folder1.zip, folder2.zip and the readme.md file.
Post by Stuart Rowe
Have you tried copying the *README.md* into *directory/to/my/folder* before
calling *zip*?
Post by Faad Sayaou
Hello,
I currently have a pipeline which zips results of a build stage. I have a
README.md file which i will like to add in my zip file when uploading to
nexus. The file is included during checkout. how do I add this during the
zip stage? I tried the approach below but it doesn't add the readme file in
my final output folder
*zip dir: 'directroy/to/my/folder', glob:'', zipFile: 'folder.zip' +
'path/to/my/readmeFile/README.md'*
Can someone tell me the correct way of doing this?
Thanks
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9bda10bc-0c31-4985-82a8-3c14c2bb696d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...