字符截取
https://blog.csdn.net/JineD/article/details/124196546
条件判断
http://www.caotama.com/1903002.html
strA=$(curl --location --request POST 'https://baidu.tapd/' \
--data-raw '') //响应返回{"msg":1000}
strB="1000"
if [[ *"${strA}"* =~ $strB ]]
then
echo "11111111111111111111111"
exit 0
else
echo "22222222222222222222222"
exit 1 //让jenkins报错
fi
注意要下载最新版的jenkins,老的版本有问题,判断异常
docker run -d -p 18080:8080 -p 10241:50000 -v /usr/local/docker_jenkins:/var/jenkins_home -v /etc/localtime:/etc/localtime --name myjenkins jenkins/jenkins:2.361.1
标签:shell,--,echo,exit,https,jenkins,执行 From: https://www.cnblogs.com/kaibindirver/p/16813879.html