Jenkins+Ansible+Gitlab自动化部署三剑客(四)--Jenkins Linux shell集成
Jenkins应用--Linux shell集成
1.新建项目
2.构建添加shell
#!/bin/sh user=`whoami` if [ $user == 'deploy' ] then echo "Hello, my name is $user" else echo "Sorry, I am not $user" fi ip addr cat /etc/system-release free -m df -h py_cmd=`which python` $py_cmd --version
3.执行构建
人生短短数十载,经不起几次重头再来