Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Grails 中,我可以从中获取内部版本号:
<g:meta name="build.number"/>
但是,我想获取 build.number 并将其放入 URL 中,这样我就可以超链接到实际构建。
<a href="http://localhost/jenkins/builds/{build.number}/showall>click here fore build info</a>
任何想法我如何做到这一点?
如果你想在 gsp 中这样做,你可以尝试:
${g.meta([name: 'build.number'])}
因此,您的代码如下所示:
<a href="http://localhost/jenkins/builds/${g.meta([name: 'build.number'])}/showall">click here fore build info</a>