% import com.github.goldin.plugins.jenkins.* import com.github.goldin.plugins.jenkins.beans.* import com.github.goldin.plugins.jenkins.Job.* import com.github.goldin.plugins.jenkins.Job.JobType String jobLink ( String jobId ) { assert jenkinsUrl && jobId "$jobId" } String tableRow ( String title, String value, boolean code = false, boolean quotes = false ) { final valueQuoted = ( quotes ? '"' + value + '"' : value ) value ? """|
' + valueQuoted + '' ) : valueQuoted }${ tasks[ 0 ].commandShortened }""
:
"| - ${ it.descriptionTableTitle } | : | "${ it.commandShortened }" |
| Job | ${ jobLink( job.id ) } |
| Pre-build steps | ${ tasks( job.prebuildersTasks ) } |
| Post-build steps | ${ tasks( job.postbuildersTasks ) } |
| Deployed to Artifactory |
${ job.artifactory.name }
=>
"${ job.artifactory.repository }"
|
| Svn update policy | Revert - [${ job.doRevert }], update - [${ job.useUpdate }], checkout - [${ ! job.useUpdate }] |
| Triggers |
<%
job.triggers().each
{
Trigger trigger ->
%>
- ${ trigger.type }${ trigger.expression ? ': "' + trigger.expression + '"' : '' }${ trigger.description ? ' (' + trigger.description + ')' : '' }<% } %> |
| Build steps | ${ tasks( job.tasks ) } |
| ${ job.scmType.capitalize() } repositor${ ( job.repositories().size == 1 ) ? 'y' : 'ies' } |
<%
job.repositories().each
{
Repository repo ->
%>
- ${ repo.remote }
<%
if ( repo.git )
{
%>
: ${ repo.gitBranch }<% } } %> |
| Invokes |
<%
job.invoke.jobsSplit.each
{
String invokedJobId ->
%>
- ${ jobLink( invokedJobId ) } when this job ${ job.invoke.condition[ 1 ] } <% } %> |
| Invoked by |
<%
job.invokedBy.each
{
Job invokedBy ->
%>
- ${ jobLink( invokedBy.id ) } when it ${ invokedBy.invoke.condition[ 1 ] } <% } %> |