Hi,
I have a node application setup on git and inside that have a shell script in which I am trying to run the apic commands to login to an API connect server.
Here is the script content as of now.
APIC=$(pwd)/node_modules/.bin/apic
echo "\n BEFORE API login" ${APIC} login --server apiconnectserver --username ${APIM_LOGIN} -password ${APIM_PWD}
This shell script is being invoked by a Jenkins (Jenkins setup is in linux) task. The issue that I face is that whenever the apic command is invoked I get the following message.
Please review the license for API Connect available in /home/jenkins/jenkins_root/workspace/script_gaurav/scripts/node_modules/apiconnect/LICENSE.txt and select yes to accept. (Use arrow keys) ❯ yes no [?25l[?25h
Now since this is in a script, I can't find a way to accept the license. Is there any apic command or any other way that can help to accept the license from within the shell script? Or am I doing something wrong here?
Thanks, Gaurav
Answer by GauravBhattacharjee (80) | Apr 19, 2016 at 01:41 AM
OK. As I posted this query, one of my colleagues tried this command echo "yes" | apic So for anyone who has a similar issue, following script would resolve the issue.
APIC=$(pwd)/node_modules/.bin/apic echo "yes" | ${APIC} login --server apiconnectserver --username ${APIM_LOGIN} -password ${APIM_PWD}
Thanks Gaurav
Unable to delete a catalog due to a hanging plan 1 Answer
Cannot find the TLS profile "client:Loopback-client" with API Connect 3 Answers
API Connect & delay in publishing documentation to developer portal 6 Answers
Unable to discover tables in SQL database which has schema other than "dbo." 0 Answers
Roles and Scopes in API Connect 1 Answer