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

FILE macro is generically useful and could be part of the token-macro plugin

    Details

    • Similar Issues:

      Description

      Email-ext defines a ${FILE, path='foo.txt'} token macro which makes it possible to read in the contents of a file.

      This seems generic enough to be useful in many cases (like $PROPFILE), and indeed I wanted to integrate the $FILE macro into one of my plugins. But it seems weird to depend on the email-ext plugin, and I didn't really want to copy the code into my own plugin.

      So would it be possible to move this macro implementation up to the token-macro-plugin itself?

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          I'm not sure if that would work, but there could be a separate token created in token-macro or something, and then an alias could be used in email-ext, while retaining the current token. Or maybe it would just work to release the two plugins at the same time.

          Show
          slide_o_mix Alex Earl added a comment - I'm not sure if that would work, but there could be a separate token created in token-macro or something, and then an alias could be used in email-ext, while retaining the current token. Or maybe it would just work to release the two plugins at the same time.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Alex Earl
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/tokenmacro/impl/WorkspaceFileMacro.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/impl/AdminEmailMacroTest.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/impl/EnvironmentVariableMacroTest.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacroTest.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/impl/PropertyFromFileMacroTest.java
          src/test/java/org/jenkinsci/plugins/tokenmacro/impl/WorkspaceFileMacroTest.java
          http://jenkins-ci.org/commit/token-macro-plugin/e74bf1c4898ab0359bf5e4e3f5c54e6efbd520d3
          Log:
          Fix JENKINS-27540

          Add FILE macro.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: pom.xml src/main/java/org/jenkinsci/plugins/tokenmacro/impl/WorkspaceFileMacro.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/AdminEmailMacroTest.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/EnvironmentVariableMacroTest.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/LogRegExMacroTest.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/PropertyFromFileMacroTest.java src/test/java/org/jenkinsci/plugins/tokenmacro/impl/WorkspaceFileMacroTest.java http://jenkins-ci.org/commit/token-macro-plugin/e74bf1c4898ab0359bf5e4e3f5c54e6efbd520d3 Log: Fix JENKINS-27540 Add FILE macro.
          Hide
          slide_o_mix Alex Earl added a comment -

          Added FILE macro to token-macro.

          Show
          slide_o_mix Alex Earl added a comment - Added FILE macro to token-macro.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/WorkspaceFileMacro/help.jelly
          http://jenkins-ci.org/commit/token-macro-plugin/b483845c43d5d36e0427c46d396111d7fa381ea9
          Log:
          JENKINS-27540 Add help text for FILE macro.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/resources/org/jenkinsci/plugins/tokenmacro/impl/WorkspaceFileMacro/help.jelly http://jenkins-ci.org/commit/token-macro-plugin/b483845c43d5d36e0427c46d396111d7fa381ea9 Log: JENKINS-27540 Add help text for FILE macro.

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              orrc Christopher Orr
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: