I am trying to execute the command "sqlplus -S ${db_user}/${db_password}@${db_host}:1521/${db_sid} @${WORKSPACE}/${FIX_VERSION}/${sql_file}" in a Jenkins build and I keep getting the error "sqlplus: command not found." I have a mac and downloaded sqlplus through homebrew. I'm not sure what I am missing (if it is potentially environment variables), or how to solve the problem
CodePudding user response:
Try updating the PATH variable to include sqlplus executable location before executing your SQL plus command.
sh """
PATH=<SQL_PLUS_HOME>/bin:$PATH
sqlplus -version
"""