Can you share your single quote version? I just want to make sure you are
doing what I expect.

On Fri, Jun 23, 2023 at 7:16 AM Jyoti singhal <[email protected]> wrote:

> i have tried with Single quotes as well , it takes it as a text and print
> the complete line as it is.
>
> Thanks,
> Jyoti
>
> On Fri, 23 Jun, 2023, 18:16 Alex Earl, <[email protected]> wrote:
>
>> When you use double quotes in pipeline, the groovy engine will try and
>> interpolate the variables it sees. You should try using single quotes
>> around the body value.
>>
>> On Fri, Jun 23, 2023, 04:13 Jyoti singhal <[email protected]> wrote:
>>
>>> Hi All,
>>>
>>> I am trying to get one line from build logs and sending in email for
>>> that i tied to use BUILD_LOG_REGEX in emailext but its throwing me this
>>> error
>>>
>>> *CodCode:*
>>> *```*
>>> { emailext (
>>> mimeType: 'text/html',
>>> attachLog: true,
>>> subject: "Jenkins Build ${currentBuild.currentResult}: Job ${
>>> env.JOB_NAME}",
>>> body: "${BUILD_LOG_REGEX, regex="Check out job at", maxMatches=2,
>>> showTruncatedLines=false}",
>>> to: 'jyoti2xx'
>>> *```*
>>> *Error:*
>>> 6:10:26  org.codehaus.groovy.control.MultipleCompilationErrorsException:
>>> startup failed:
>>> 16:10:26  WorkflowScript: 38: unexpected token: BUILD_LOG_REGEX @ line
>>> 38, column 15.
>>> 16:10:26          body: "${BUILD_LOG_REGEX, regex="Check out job at",
>>> maxMatches=2, showTruncatedLines=false}",
>>> 16:10:26
>>>
>>>
>>> Any idea how to fix this issue?
>>>
>>> Thanks,
>>> Jyoti
>>>
>>> --
>>> 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/b64d7b8d-1595-40bd-8096-f88da3e2e81cn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/b64d7b8d-1595-40bd-8096-f88da3e2e81cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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/CAPiUgVefUjn8GLFfaY%3DBmzyd428bbT08e2R5i%3D1e5_TdRq3A0g%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVefUjn8GLFfaY%3DBmzyd428bbT08e2R5i%3D1e5_TdRq3A0g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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/CA%2BC7GVyxERm9u9qO0703457Gpj97NfuTbGQZgz3078rx%3Dbs43g%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CA%2BC7GVyxERm9u9qO0703457Gpj97NfuTbGQZgz3078rx%3Dbs43g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Website: http://earl-of-code.com

-- 
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/CAPiUgVeOAVMr8QnY-%2B-H2Bp7uivy0FYmiBcCZGWctnLwYk1ofw%40mail.gmail.com.

Reply via email to