Sonar建议每天只运行一次作业。每个代码签入(每天多次)触发约100个现有的maven构建。如何重新使用现有的作业定义每天只发布一次?
答案 0 :(得分:1)
可能你只有两个选择:
sonar:sonar
示例:
// standard build
...
// SonarQube
directory = /directory-which-not-be-deleted-by-build/timestamps
file = $directory/$JOB_NAME-$(date '+%Y-%m-%d')
if [ ! -f $file ];
then
// execute analysis
...
// create timestamp file
mkdir -p $directory
touch $file
fi
当然,您还应定期清除$directory
:
tmpwatch 30d /directory-which-not-be-deleted-by-build/timestamps/