Node.js 节点应用程序无法从Jenkins启动
我有一个ansible文件,通过Jenkins运行Node.js 节点应用程序无法从Jenkins启动,node.js,angular,jenkins,ansible,Node.js,Angular,Jenkins,Ansible,我有一个ansible文件,通过Jenkins运行 shell: 'unzip -o p.zip' args: chdir: '/home/ec2-user/' - pause: seconds=10 - name: install eslint shell: 'npm install -g eslint --unsafe-perm=true --allow-root' args: chdir: '/home/ec2-user/' - name: remove
shell: 'unzip -o p.zip'
args:
chdir: '/home/ec2-user/'
- pause: seconds=10
- name: install eslint
shell: 'npm install -g eslint --unsafe-perm=true --allow-root'
args:
chdir: '/home/ec2-user/'
- name: remove node-sass
shell: 'npm uninstall --save-dev node-sass'
args:
chdir: '/home/ec2-user/'
- name: install node-sass
shell: 'npm install --save-dev node-sass'
args:
chdir: '/home/ec2-user/'
failed_when: false
- pause: seconds=10
- name: start ng serve
shell: 'ng serve --port 4401 --host 0.0.0.0 --verbose &'
args:
chdir: '/home/ec2-user/'
但是应用程序正在被杀死。
当我手动运行最后一个命令时,它会显示服务:-ngserve--port4401--host 0.0.0.0--verbose&
同一命令通过下面的ansible失败
shell:'nohup ng serve--port 4401--host 0.0.0.0>nohup.out 2>&1&'
是否有任何错误?剧本的哪一步失败了?没有错误,它成功运行了