主节点
保留参数为文件
cd $WORKSPACE/ mkdir building&&cd building cmake ..&&make tar -czf lib.tar.gz lib rm -rf /home/hyc/jenkins/ask/lib.tar.gz cp lib.tar.gz /home/hyc/jenkins/ask cd /home/hyc/jenkins/ask echo $srcName >arg1 echo $saveImg >arg2
从节点
拷贝可执行程序和参数文件,以参数运行
cd /home/jen rm * -rf scp [email protected]:/home/ng/ngpoint . chmod 777 ngpoint&&mv ngpoint ngpoint_test rm /usr/bin/ngpoint_test -rf cp ngpoint_test /usr/bin/ scp [email protected]:/home/hyc/jenkins/ask/lib.tar.gz . scp [email protected]:/home/hyc/jenkins/ask/arg1 . scp [email protected]:/home/hyc/jenkins/ask/arg2 . tar -xvf lib.tar.gz&&cd lib rm /lib64/libpcb_defect_detect.so* -rf cp libpcb_defect_detect.so* /lib64 cd .. ngpoint_test "-test" $(cat arg1) $(cat arg2)
cp /home/AIconf/ngpoint.conf /home/AIconf/ngpoint_test.conf liaohao_batches=$(cat $batches_file) IFS=',' read -ra strArr <<<"$liaohao_batches" for i in "${strArr[@]}"; do echo "$i" ver=$(grep VERSION /home/AIconf/config.h | awk '{print $3}') factory=$(grep FACTORY_NAME /home/AIconf/config.h | awk '{print $3}') version=$ver.$factory echo $version cd ..&&ngpoint "-test" $i $saveImg $factory $version done
标签:lib,tar,cd,ngpoint,构建,home,jenkins,节点 From: https://www.cnblogs.com/hyhc8848/p/17104976.html