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

EMail-Ext Extended Pipeline Support - Failed Tests

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: email-ext-plugin
    • Labels:
      None
    • Environment:
      email-ext-plugin version 2.50
    • Similar Issues:

      Description

      JENKINS-35367 got part way towards supporting email-ext within pipeline builds, but the following tokens still fail to expand when placed in the subject or body of an email: FAILED_TESTS, TEST_COUNTS, and TRIGGER_NAME.

      The email instead contains the following text:
      FAILED_TESTS is not supported in this context

        Attachments

          Activity

          Hide
          davidvanlaatum David van Laatum added a comment -

          version 2.51 released

          Show
          davidvanlaatum David van Laatum added a comment - version 2.51 released
          Hide
          matthewreiter Matthew Reiter added a comment -

          I've verified that FAILED_TESTS, TEST_COUNTS, and TRIGGER_NAME are now properly expanded.

          Show
          matthewreiter Matthew Reiter added a comment - I've verified that FAILED_TESTS, TEST_COUNTS, and TRIGGER_NAME are now properly expanded.
          Hide
          stefanthurnherr Stefan Thurnherr added a comment -

          So this doesnt seem to work in Jenkinsfile pipeline, but it should since this issue is solved?

          emailext from: 'ci-notification@mycompany.com',
                          to: toList,
                          subject: "Build failed for ${gitBranch}",
                          body: "Failed tests (if any):\n ${FAILED_TESTS}"
          

          I'm getting exception: exception: 'groovy.lang.MissingPropertyException: No such property: FAILED_TESTS for class: groovy.lang.Binding', message: 'No such property: FAILED_TESTS for class: groovy.lang.Binding'

          Show
          stefanthurnherr Stefan Thurnherr added a comment - So this doesnt seem to work in Jenkinsfile pipeline, but it should since this issue is solved? emailext from: 'ci-notification@mycompany.com', to: toList, subject: "Build failed for ${gitBranch}", body: "Failed tests (if any):\n ${FAILED_TESTS}" I'm getting exception: exception: 'groovy.lang.MissingPropertyException: No such property: FAILED_TESTS for class: groovy.lang.Binding', message: 'No such property: FAILED_TESTS for class: groovy.lang.Binding'
          Hide
          satoshi_oshita Satoshi Oshita added a comment -

          I thinkĀ FAILED_TESTS should be written as below in pipeline.

          emailext from: 'ci-notification@mycompany.com',
                          to: toList,
                          subject: "Build failed for ${gitBranch}",
                          body: "Failed tests (if any):\n \$FAILED_TESTS"
          
          Show
          satoshi_oshita Satoshi Oshita added a comment - I thinkĀ FAILED_TESTS should be written as below in pipeline. emailext from: 'ci-notification@mycompany.com' , to: toList, subject: "Build failed for ${gitBranch}" , body: "Failed tests ( if any):\n \$FAILED_TESTS"
          Hide
          stefanthurnherr Stefan Thurnherr added a comment -

          Satoshi Oshita Thank you you made my day, works like a charm!

          Show
          stefanthurnherr Stefan Thurnherr added a comment - Satoshi Oshita Thank you you made my day, works like a charm!

            People

            • Assignee:
              davidvanlaatum David van Laatum
              Reporter:
              matthewreiter Matthew Reiter
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: