[JIRA] (JENKINS-13347) Using ${SVN_REVISION} in build-name-setter Build Name returns error: Unrecognized macro 'SVN_REVISION'

已查看 1,542 次
跳至第一个未读帖子

ronan@jouchet.fr (JIRA)

未读,
2012年4月4日 11:27:242012/4/4
收件人 jenkinsc...@googlegroups.com
Ronan Jouchet created JENKINS-13347:
---------------------------------------

Summary: Using ${SVN_REVISION} in build-name-setter Build Name returns error: Unrecognized macro 'SVN_REVISION'
Key: JENKINS-13347
URL: https://issues.jenkins-ci.org/browse/JENKINS-13347
Project: Jenkins
Issue Type: Bug
Components: build-name-setter
Environment: Windows 2008 R2 SP1
Java 1.6.0_31 x64
Tomcat 6.0.35
Jenkins 1.458
SVN
Reporter: Ronan Jouchet
Assignee: Kohsuke Kawaguchi


My Jenkins instance/project are working just fine and builds work as expected.
Now I try to use the "build-name-setter" plugin. My goal is to have build names like "svn123build9879".

I installed the plugin via the plugin manager, and set the new "Build Name" field to "svn${SVN_REVISION}build${BUILD_NUMBER}" (without quotes). It looks like the expected syntax, and I can see ${SVN_REVISION} in my env-vars.html
However, this leads to the following error in the console log:
Unrecognized macro 'SVN_REVISION' in 'svn${SVN_REVISION}build${BUILD_NUMBER}'

I'm available for more info. I searched for similar bugs, sorry if that's not a but but just a misconfiguration, please point me to what you think might be wrong.

--
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


ronan@jouchet.fr (JIRA)

未读,
2012年4月4日 11:31:242012/4/4
收件人 jenkinsc...@googlegroups.com

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

Ronan Jouchet updated JENKINS-13347:
------------------------------------

Environment:
Windows 2008 R2 SP1 x64
Java 1.6.0_31 x64 from Oracle
Tomcat 6.0.35
Jenkins 1.458, freshly installed and never upgraded
SVN

was:


Windows 2008 R2 SP1
Java 1.6.0_31 x64
Tomcat 6.0.35
Jenkins 1.458
SVN

> Using ${SVN_REVISION} in build-name-setter Build Name returns error: Unrecognized macro 'SVN_REVISION'

> ------------------------------------------------------------------------------------------------------


>
> Key: JENKINS-13347
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13347
> Project: Jenkins
> Issue Type: Bug
> Components: build-name-setter

> Environment: Windows 2008 R2 SP1 x64
> Java 1.6.0_31 x64 from Oracle
> Tomcat 6.0.35
> Jenkins 1.458, freshly installed and never upgraded


> SVN
> Reporter: Ronan Jouchet
> Assignee: Kohsuke Kawaguchi

> Labels: plugin

ronan@jouchet.fr (JIRA)

未读,
2012年4月5日 16:19:242012/4/5
收件人 jenkinsc...@googlegroups.com

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

Ronan Jouchet commented on JENKINS-13347:
-----------------------------------------

Actually my problem is not related to SVN_REVISION. All macros seem to fail: setting build-name=${BUILD_NUMBER}-${JOB_NAME} returns in:

Unrecognized macro 'JOB_NAME' in '${BUILD_NUMBER}-${JOB_NAME}'



> Using ${SVN_REVISION} in build-name-setter Build Name returns error: Unrecognized macro 'SVN_REVISION'

> ------------------------------------------------------------------------------------------------------


>
> Key: JENKINS-13347
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13347
> Project: Jenkins
> Issue Type: Bug
> Components: build-name-setter

> Environment: Windows 2008 R2 SP1 x64
> Java 1.6.0_31 x64 from Oracle
> Tomcat 6.0.35
> Jenkins 1.458, freshly installed and never upgraded

> SVN
> Reporter: Ronan Jouchet
> Assignee: Kohsuke Kawaguchi

> Labels: plugin

ronan@jouchet.fr (JIRA)

未读,
2012年4月5日 16:19:242012/4/5
收件人 jenkinsc...@googlegroups.com

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

Ronan Jouchet edited comment on JENKINS-13347 at 4/5/12 8:18 PM:
-----------------------------------------------------------------

Actually my problem is not related to SVN_REVISION. All macros seem to fail: setting build-name=${BUILD_NUMBER}-${JOB_NAME} returns this:


Unrecognized macro 'JOB_NAME' in '${BUILD_NUMBER}-${JOB_NAME}'

was (Author: ronj):


Actually my problem is not related to SVN_REVISION. All macros seem to fail: setting build-name=${BUILD_NUMBER}-${JOB_NAME} returns in:

Unrecognized macro 'JOB_NAME' in '${BUILD_NUMBER}-${JOB_NAME}'

> Using ${SVN_REVISION} in build-name-setter Build Name returns error: Unrecognized macro 'SVN_REVISION'

> ------------------------------------------------------------------------------------------------------


>
> Key: JENKINS-13347
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13347
> Project: Jenkins
> Issue Type: Bug
> Components: build-name-setter

> Environment: Windows 2008 R2 SP1 x64
> Java 1.6.0_31 x64 from Oracle
> Tomcat 6.0.35
> Jenkins 1.458, freshly installed and never upgraded

> SVN
> Reporter: Ronan Jouchet
> Assignee: Kohsuke Kawaguchi

> Labels: plugin

ronan@jouchet.fr (JIRA)

未读,
2012年4月5日 16:21:242012/4/5
收件人 jenkinsc...@googlegroups.com

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

Ronan Jouchet updated JENKINS-13347:
------------------------------------

Summary: Build Name returns 'Unrecognized macro' errors for everything except ${BUILD_NUMBER} (was: Using ${SVN_REVISION} in build-name-setter Build Name returns error: Unrecognized macro 'SVN_REVISION')

> Build Name returns 'Unrecognized macro' errors for everything except ${BUILD_NUMBER}
> ------------------------------------------------------------------------------------


>
> Key: JENKINS-13347
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13347
> Project: Jenkins
> Issue Type: Bug
> Components: build-name-setter

> Environment: Windows 2008 R2 SP1 x64
> Java 1.6.0_31 x64 from Oracle
> Tomcat 6.0.35
> Jenkins 1.458, freshly installed and never upgraded

> SVN
> Reporter: Ronan Jouchet
> Assignee: Kohsuke Kawaguchi

> Labels: plugin

assembling.signals@yandex.ru (JIRA)

未读,
2012年7月10日 18:46:232012/7/10
收件人 jenkinsc...@googlegroups.com

Workaround:

${ENV,var="SVN_REVISION"}

Note: When using multiple Subversion locations, the environment variables are names such as:

SVN_REVISION_1, SVN_REVISION_2, ...
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

ronan@jouchet.fr (JIRA)

未读,
2012年7月11日 11:54:232012/7/11
收件人 jenkinsc...@googlegroups.com

Works! I think the more general bug remains valid, so I won't close yet.
Thanks for the help

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

assembling.signals@yandex.ru (JIRA)

未读,
2012年7月14日 05:42:232012/7/14
收件人 jenkinsc...@googlegroups.com

Glad I could help. I looked up the environment variables for the project by calling:
http://localhost:8080/env-vars.html/?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

juraj.misur@gmail.com (JIRA)

未读,
2013年4月16日 11:33:322013/4/16
收件人 jenkinsc...@googlegroups.com
Juraj Misur commented on Bug JENKINS-13347

I have a release build where I can specify release version via "Release_version" string parameter and I want use that one for setting build name using this parameter as ${Release_version}. That would be super cool. Would the ENV hack work here?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

eric.pyle@cd-adapco.com (JIRA)

未读,
2013年6月20日 12:57:582013/6/20
收件人 jenkinsc...@googlegroups.com
Eric Pyle commented on Bug JENKINS-13347

I believe this is actually the Token Macro plugin. I encountered this in a change made to an existing job, adding a Conditional Step to trigger a build of another job an existing set of Post-Build Script steps. The build is triggered with two predefined parameters, the first of which is $JOB_NAME. Here's the error from the console log:

09:45:17 Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'JOB_NAME' in '${JOB_NAME}'], action = [Fail the build]
09:45:17 Build step 'Use publishers from another project' changed build result to FAILURE
09:45:17 Build step 'Use publishers from another project' marked build as failure

I'm running Jenkins 1.466.2 on a Linux platform, Token Macro plugin version 1.5.1, PostBuildScript plugin version 0.7.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.

ljaderdev@gmail.com (JIRA)

未读,
2014年2月24日 13:31:582014/2/24
收件人 jenkinsc...@googlegroups.com
Change By: Łukasz Jąder (24/Feb/14 6:31 PM)
Assignee: Kohsuke Kawaguchi Łukasz Jąder
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
回复全部
回复作者
转发
0 个新帖子