0
我想为所有jenkins作业添加“git tag”脚本,并且我知道如何将脚本添加到一个特定的作业。但是有没有办法在全球范围内为每项工作添加此脚本?如何将shell脚本添加到所有jenkins作业?
cd ${WORKSPACE}/${project}
prefix="btag"
if [[ "$buildtype" = "Release" || "$buildtype" = "FirstPublish" ]];then
prefix="rtag"
fi
tag=`date "+$prefix-%Y%m%d-%H%M%S-${BUILD_USER}"`
git tag $tag
git push origin $tag