Ich möchte "Git-Tag" -Skript zu allen Jenkins-Jobs hinzufügen, und ich weiß, wie Sie das Skript zu einem bestimmten Job hinzufügen. Aber gibt es eine Möglichkeit, dieses Skript global für jeden Job hinzuzufügen?Wie fügt man allen jenkins-Jobs ein Shell-Skript hinzu?
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