Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25501

Results not being propagated to ENV variables

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Component/s: warnings-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.580.1, plugin is CI version 4.44 downloaded on 11/5
    • Similar Issues:

      Description

      variables Warning_Count, Warning_Result and most likely others are not showing correct values.

      Setup is 3 Warning Parsers, MSBuild, Robocopy, and a custom one. When run many warnings are found in all the types but when trying to use Variables Count always shows 0 and Results always shows Succss

        Attachments

          Activity

          Hide
          drulli Ulli Hafner added a comment -

          I finally managed it to set up some test cases. All tests are running quite well, so I think we are talking about different things in this issue. The analysis plugins only produce tokens for the token macro plugin. These tokens can then be consumed by supporting plugins (like email-ext). I.e. you can use ${WARNINGS_COUNT} as content of the mail subject or body. These tokens are not available as environment variables.

          Show
          drulli Ulli Hafner added a comment - I finally managed it to set up some test cases. All tests are running quite well, so I think we are talking about different things in this issue. The analysis plugins only produce tokens for the token macro plugin. These tokens can then be consumed by supporting plugins (like email-ext). I.e. you can use ${WARNINGS_COUNT} as content of the mail subject or body. These tokens are not available as environment variables.
          Hide
          jstarbird Jon Starbird added a comment -

          Ok. I didn't know that. However, I put them into the email-ext one and still don't get the correct values.
          I'll try it again today. I have all plugins you've mentioned and the latest versions, based on the Long-term Support Release of Jenkins.

          Show
          jstarbird Jon Starbird added a comment - Ok. I didn't know that. However, I put them into the email-ext one and still don't get the correct values. I'll try it again today. I have all plugins you've mentioned and the latest versions, based on the Long-term Support Release of Jenkins.
          Hide
          drulli Ulli Hafner added a comment -

          You need to use the latest warnings plugin 4.44 (this contains the fix of the snapshot version you have tested).

          Is there a plugin that exposes tokens as environment variables?

          Show
          drulli Ulli Hafner added a comment - You need to use the latest warnings plugin 4.44 (this contains the fix of the snapshot version you have tested). Is there a plugin that exposes tokens as environment variables?
          Hide
          jstarbird Jon Starbird added a comment -

          No. What I was doing for my testing was using the Tokens Macro values and saving them into Environment variables.
          But for the emails I was using only the Tokens. I'll try it again this afternoon.

          Show
          jstarbird Jon Starbird added a comment - No. What I was doing for my testing was using the Tokens Macro values and saving them into Environment variables. But for the emails I was using only the Tokens. I'll try it again this afternoon.
          Hide
          jstarbird Jon Starbird added a comment -

          Ok it is working in emails now, thanks.

          Question, what I'm trying to accomplish is I only want my build to Fail or be Unstable with MSBuild warnings but I want the reports for Robocopy and a homemade parser to still be produced. So what I was doing was using the Conditional Multi Step task to run Warnings earlier in the build to get my MSBuild Warnings and then was trying to save those results out and that is where I was trying to put the values saved out as Environment Variables.

          Is there any way for to get those separate values out??

          Show
          jstarbird Jon Starbird added a comment - Ok it is working in emails now, thanks. Question, what I'm trying to accomplish is I only want my build to Fail or be Unstable with MSBuild warnings but I want the reports for Robocopy and a homemade parser to still be produced. So what I was doing was using the Conditional Multi Step task to run Warnings earlier in the build to get my MSBuild Warnings and then was trying to save those results out and that is where I was trying to put the values saved out as Environment Variables. Is there any way for to get those separate values out??

            People

            • Assignee:
              drulli Ulli Hafner
              Reporter:
              jstarbird Jon Starbird
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: