Powershell 詹金斯全局函数
假设我有一个powershell函数:Powershell 詹金斯全局函数,powershell,jenkins,Powershell,Jenkins,假设我有一个powershell函数: function checkFile { if (Test-Path $args[0]) { if((Get-Item $args[0]).length -gt 0kb){ return $true } } return $false } 有没有可能让jenkins中的所有项目都可以访问此函数,这样我就不必在每个powershell脚本中定义checkFile 我知道如何
function checkFile
{
if (Test-Path $args[0]) {
if((Get-Item $args[0]).length -gt 0kb){
return $true
}
}
return $false
}
有没有可能让jenkins中的所有项目都可以访问此函数,这样我就不必在每个powershell脚本中定义checkFile
我知道如何在jenkins中定义全局变量。但目前似乎不可能定义全局函数。这里是