嗨,我需要帮助来写Jenkins管道,如果“编译以下类型错误”这句话发生。管道应中止
我尝试了if(sh(npm run build:dev).exitCode!= 0)则{
echo 'npm build failed with compilation error'
}
else
{
echo 'npm build succeeded'
}
fi
字符串
但我不确定它是工作还是不显示syntex错误“{”意外(期待“然后”)
1条答案
按热度按时间sh7euo9m1#
您可以(或许应该)改用try catch块。
字符串
相关文件