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

Default pre-send script variable gets expanded inside the job confguration

    Details

    • Similar Issues:

      Description

      I have a groovy script set in the global configuration for this email-ext plugin as a "Default Pre-send Script". Set it up as: ${SCRIPT, template="scan-email.groovy"}

      I add this script to my job configurations as: $DEFAULT_PRESEND_SCRIPT in the field "Pre-send Script"

      The script will get called at the appropriate time when the job runs. But after the job has run, inside the jobs configuration, there will no longer be the $DEFAULT_PRESEND_SCRIPT I originally entered. That field will contain the scripts contents. Aka, it expanded the $DEFAULT_PRESEND_SCRIPT variable with the content of the script.

      Now, a setup like this will still work, but if I happen to edit this script, this job will not get the most recent changes I made to that script as it will just continue to use what is entered in its configuration.

      Expected behavior:
      I would have expected that $DEFAULT_PRESEND_SCRIPT stays as it is inside the jobs configuration. Pretty much like $DEFAULT_CONTENT does.

      Please find attached a sample job configuration and notice the difference before and after that job has run.

        Attachments

          Activity

          maccer Mac Cer created issue -
          slide_o_mix Alex Earl made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 152579 ] JNJira + In-Review [ 194270 ]

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              maccer Mac Cer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: