templates.jenkins-build.vm Maven / Gradle / Ivy
#*
* Copyright (c) 2012-present Marvelution B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*###
#* @vtlvariable name="baseUrl" type="java.lang.String" *#
#* @vtlvariable name="build" type="org.marvelution.jira.plugins.jenkins.model.Build" *#
#* @vtlvariable name="buildUrl" type="java.net.URI" *#
#* @vtlvariable name="job" type="org.marvelution.jira.plugins.jenkins.model.Job" *#
#* @vtlvariable name="jobUrl" type="java.net.URI" *#
#* @vtlvariable name="issueKeys" type="java.util.List" *#
#* @vtlvariable name="projectKeys" type="java.util.List" *#
$build.cause
Ran $velocityUtils.getRelativePastDate($build.buildDate) | Duration
$velocityUtils.getDurationString($build.duration)
#if($build.testResults)
$build.testResults.total Total Tests | $build.testResults.failed Failed Tests |
$build.testResults.skipped Skipped Tests
#end
#set ($result = $build.result.key())
#if ($result == "success")
#set($color = "green")
#set($iconname = "approve")
#elseif ($result == "failure")
#set($color = "red")
#set($iconname = "error")
#elseif($result == "unstable")
#set($color = "yellow")
#set($iconname = "error")
#else
#set($color = "gray")
#set($iconname = "devtools-task-cancelled")
#end
#if($build.deleted || $job.deleted)
#if($build.displayName)$build.displayName#else$job.displayName #$build.number#end
#elseif($build.displayName)
$build.displayName
#else
$job.displayName #$build.number
#end