提交 b3120b1b 编写于 作者: L liuyq-617

Determine whether the file has changed

上级 a17b11c6
......@@ -4,29 +4,35 @@ pipeline {
WK = '/var/lib/jenkins/workspace/TDinternal'
WKC= '/var/lib/jenkins/workspace/TDinternal/community'
}
stages{
stage('pre build'){
agent{label 'master'}
steps{
sh '''
${WKC}
td=`git diff develop remotes/origin/develop`
if [ ! $td ];then
echo "no changes,skip build"
exit 0
fi
echo "check OK!"
'''
}
}
}
stages {
stage('pre build'){
agent{label 'master'}
steps{
sh '''
cd ${WKC}
td=`git diff develop remotes/origin/develop`
if [ ! $td ];then
echo "no changes,skip build"
exit 0
fi
echo "check OK!"
'''
}
}
stage('Parallel test stage') {
parallel {
stage('pytest') {
agent{label 'master'}
steps {
sh '''
cd ${WKC}
td=`git diff develop remotes/origin/develop`
if [ ! $td ];then
echo "no changes,skip build"
exit 0
fi
date
cd ${WKC}
git checkout develop
......@@ -52,6 +58,12 @@ pipeline {
agent{label '184'}
steps {
sh '''
cd ${WKC}
td=`git diff develop remotes/origin/develop`
if [ ! $td ];then
echo "no changes,skip build"
exit 0
fi
date
cd ${WKC}
git checkout develop
......@@ -78,7 +90,12 @@ pipeline {
agent{label "185"}
steps {
sh '''
cd ${WKC}
td=`git diff develop remotes/origin/develop`
if [ ! $td ];then
echo "no changes,skip build"
exit 0
fi
cd ${WKC}
git checkout develop
git pull
......@@ -107,6 +124,12 @@ pipeline {
agent{label "186"}
steps {
sh '''
cd ${WKC}
td=`git diff develop remotes/origin/develop`
if [ ! $td ];then
echo "no changes,skip build"
exit 0
fi
date
cd ${WKC}
git checkout develop
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册