0

I need to print the content of the file in the mail. I am using Multi-Configuration plugin in Jenkins. I have followed this link: https://stackoverflow.com/a/48923742/10220825

But in my case the file name is not fixed, so I need to use the wildcards for file name in Default Content path = "$WORKSPACE/Result/AMDuProf*-Summary-*.txt"

enter image description here

But it is not working. I am getting error in the mail.

ERROR: File '/home/abc/xyz-Jenkins/workspace/pqr/label/cde-SSP-Ubuntu-18/Result/AMDuProf*-Summary-*.txt' does not exist.

So how to use the wildcard for the file name as the file name is not fixed, will change with different slaves. Please suggest me a correct approach.

Ratnesh
  • 298
  • 3
  • 14
  • It looks like wildcards are not supported there. Also, such wildcard could catch more than one file, and what then? But maybe you could provide some common name in each job for example by creating symlink in one of build steps? – Tupteq Feb 28 '20 at 23:32
  • @Tupteq, Actually there is one file `AMDuProf*-Summary-*.txt` with the suffix Summary but the version is changed in different build i.e. not fixed. Is there any other way to do it? – Ratnesh Feb 29 '20 at 05:10
  • 1
    You can update symlink in the job to reflect file name changes. – Tupteq Mar 02 '20 at 10:35

1 Answers1

1

Before sending e-mail, use a script to rename your dynamic file to a static name such as AMDuProf-Summary-.txt and reference it when sending the e-mail

misha
  • 85
  • 4
  • 13