Quantcast

[JIRA] Created: (JENKINS-9364) Add support for tokens from the token-macro plug-in

classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] Created: (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
Add support for tokens from the token-macro plug-in
---------------------------------------------------

                 Key: JENKINS-9364
                 URL: http://issues.jenkins-ci.org/browse/JENKINS-9364
             Project: Jenkins
          Issue Type: New Feature
          Components: analysis-core, email-ext, token-macro
            Reporter: Ulli Hafner
            Assignee: Ulli Hafner
            Priority: Minor


Kohsuke released a new plug-in [token-macro|https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin] to simplify the publishing of new token for plug-ins. I added some new tokens in the static analysis plug-in suite. It would be nice if the email-ext plug-in would allow to use these tokens (and list these dynamic list of tokens in the help page).

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] Updated: (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org

     [ http://issues.jenkins-ci.org/browse/JENKINS-9364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ulli Hafner updated JENKINS-9364:
---------------------------------

       Assignee: ashlux  (was: Ulli Hafner)
    Description: Kohsuke released the new plug-in [token-macro|https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin] to simplify the publishing of new token for plug-ins. I added some new tokens in the static analysis plug-in suite. It would be nice if the email-ext plug-in would allow to use these tokens (and list these dynamic list of tokens in the help page).  (was: Kohsuke released a new plug-in [token-macro|https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin] to simplify the publishing of new token for plug-ins. I added some new tokens in the static analysis plug-in suite. It would be nice if the email-ext plug-in would allow to use these tokens (and list these dynamic list of tokens in the help page).)

> Add support for tokens from the token-macro plug-in
> ---------------------------------------------------
>
>                 Key: JENKINS-9364
>                 URL: http://issues.jenkins-ci.org/browse/JENKINS-9364
>             Project: Jenkins
>          Issue Type: New Feature
>          Components: analysis-core, email-ext, token-macro
>            Reporter: Ulli Hafner
>            Assignee: ashlux
>            Priority: Minor
>
> Kohsuke released the new plug-in [token-macro|https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin] to simplify the publishing of new token for plug-ins. I added some new tokens in the static analysis plug-in suite. It would be nice if the email-ext plug-in would allow to use these tokens (and list these dynamic list of tokens in the help page).

--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

     [ https://issues.jenkins-ci.org/browse/JENKINS-9364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Slide-O-Mix reassigned JENKINS-9364:
------------------------------------

    Assignee: Slide-O-Mix  (was: ashlux)
   

> Add support for tokens from the token-macro plug-in
> ---------------------------------------------------
>
>                 Key: JENKINS-9364
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-9364
>             Project: Jenkins
>          Issue Type: New Feature
>          Components: analysis-core, email-ext, token-macro
>            Reporter: Ulli Hafner
>            Assignee: Slide-O-Mix
>            Priority: Minor
>
> Kohsuke released the new plug-in [token-macro|https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin] to simplify the publishing of new token for plug-ins. I added some new tokens in the static analysis plug-in suite. It would be nice if the email-ext plug-in would allow to use these tokens (and list these dynamic list of tokens in the help page).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

    [ https://issues.jenkins-ci.org/browse/JENKINS-9364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163078#comment-163078 ]

SCM/JIRA link daemon commented on JENKINS-9364:
-----------------------------------------------

Code changed in jenkins
User: Alex Earl
Path:
 pom.xml
 src/main/java/hudson/plugins/emailext/ExtendedEmailPublisher.java
 src/main/java/hudson/plugins/emailext/plugins/ContentBuilder.java
 src/test/java/hudson/plugins/emailext/plugins/ContentBuilderTest.java
http://jenkins-ci.org/commit/email-ext-plugin/8fe217ea21207fe5d4f732f1ecb0113c6c9559ac
Log:
  Fix JENKINS-9364

Implemented support for token macro plugin (optional)





               

> Add support for tokens from the token-macro plug-in
> ---------------------------------------------------
>
>                 Key: JENKINS-9364
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-9364
>             Project: Jenkins
>          Issue Type: New Feature
>          Components: analysis-core, email-ext, token-macro
>            Reporter: Ulli Hafner
>            Assignee: Slide-O-Mix
>            Priority: Minor
>
> Kohsuke released the new plug-in [token-macro|https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin] to simplify the publishing of new token for plug-ins. I added some new tokens in the static analysis plug-in suite. It would be nice if the email-ext plug-in would allow to use these tokens (and list these dynamic list of tokens in the help page).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

     [ https://issues.jenkins-ci.org/browse/JENKINS-9364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Slide-O-Mix resolved JENKINS-9364.
----------------------------------

    Resolution: Fixed

Implemented support for token macro plugin.
               

> Add support for tokens from the token-macro plug-in
> ---------------------------------------------------
>
>                 Key: JENKINS-9364
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-9364
>             Project: Jenkins
>          Issue Type: New Feature
>          Components: analysis-core, email-ext, token-macro
>            Reporter: Ulli Hafner
>            Assignee: Slide-O-Mix
>            Priority: Minor
>
> Kohsuke released the new plug-in [token-macro|https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin] to simplify the publishing of new token for plug-ins. I added some new tokens in the static analysis plug-in suite. It would be nice if the email-ext plug-in would allow to use these tokens (and list these dynamic list of tokens in the help page).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jim Searle commented on New Feature JENKINS-9364

I think this change might be causing me a problem. Our jobs are configured with the default content:
${JELLY_SCRIPT,template="html_mail"}

I get this error:
Error substituting with token-macro plugin: org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'key' in '...'

This happens because in a subversion comment, which is part of the email, there is a comment that has '$key' in it.

I've seen the same problem when there is a $something in the console output as well.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: Jim Searle (20/Jun/12 7:17 PM)
Resolution: Fixed
Status: Resolved Reopened
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Slide-O-Mix commented on New Feature JENKINS-9364

Is there any way to escape the $?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Slide-O-Mix edited a comment on New Feature JENKINS-9364

Is there any way to escape the $? Also, can you please attach a build log and the jelly template you are using?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jim Searle commented on New Feature JENKINS-9364

I will look into escaping the $'s. We are using a modified version of the html_mail.jelly that comes with jenkins, but the default one will show the problem.

But, I think this error needs to be trapped so that if an error does show up, the email still gets sent?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Slide-O-Mix commented on New Feature JENKINS-9364

I actually thought this was being handled already, I'll double check.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Slide-O-Mix commented on New Feature JENKINS-9364

This is the code around where token macro is used.

Plugin tokenMacroPlugin = Jenkins.getInstance().getPlugin("token-macro");
if(tokenMacroPlugin != null) {
    try {
        newText = org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(build, listener, newText);
    } catch(Exception e) {
        listener.getLogger().println("Error substituting with token-macro plugin: " + e);
    }
}

Perhaps I need to assign the current text to a temp variable?

Plugin tokenMacroPlugin = Jenkins.getInstance().getPlugin("token-macro");
if(tokenMacroPlugin != null) {
    try {
        String temp = newText;
        temp = org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(build, listener, temp);
        newText = temp;
    } catch(Exception e) {
        listener.getLogger().println("Error substituting with token-macro plugin: " + e);
    }
}

I don't think that would make a difference though. I'll see what I can do to reproduce this.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Slide-O-Mix commented on New Feature JENKINS-9364

So, the email does not get sent? There is a log message that will be displayed, but the email should still be sent.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jim Searle commented on New Feature JENKINS-9364

Yes, the email does not get sent.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
 
Slide-O-Mix edited a comment on New Feature JENKINS-9364

Please attach a build log and screenshots of your global and project configs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Slide-O-Mix commented on New Feature JENKINS-9364

Please attache a build log and screenshots of your global and project configs.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Jim Searle commented on New Feature JENKINS-9364

Sorry, I was wrong. The email does get sent, but I'd still like to have the option to shut this off since it shows a huge error message in the console.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Slide-O-Mix commented on New Feature JENKINS-9364

Sure, that should be easy enough.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Code changed in jenkins
User: slide
Path:
src/main/java/hudson/plugins/emailext/plugins/ContentBuilder.java
http://jenkins-ci.org/commit/email-ext-plugin/f60ae09896e37eb8954ab1d302282a292c96a96a
Log:
Fix JENKINS-9364

  • removed error message for token-macro token replacement failure.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-9364) Add support for tokens from the token-macro plug-in

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Slide-O-Mix resolved New Feature JENKINS-9364 as Fixed

Removed error message logging.

Change By: Slide-O-Mix (09/Jul/12 4:24 AM)
Status: Reopened Resolved
Assignee: Slide-O-Mix Ulli Hafner
Resolution: Fixed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12
Loading...