I'm so curious about trigger input on gitlab CI pipeline *cmiiw. So, the main problem when there's any prompt on Node.js like this,
Ubuntu
But when i'm trying to implementation into Gitlab CI, there's any error something like this
Gitlab.CI
This is my gitlab.ci.yml
script
image: node:latest
cache:
paths:
- node_modules/
all_tests:
script:
- npm install
- npm run setup
- John Doe \n
- npm run test
First, CI best-practices suggest you create a
--force
or--no-interactive
variant of your installer, to omit interactive input in case of automated deploys.A workaround could be to use the
yes
unix util. This util lets you feed a string to interactive input like this (in your case):This will answer 'Gitlab CI' to all questions asked so its rather limited.
Btw; I think you mean
.gitlab-ci.yml
instead oftravis.ci.yml
in your question?