Blockquote
steps {
sh '''
export PATH=/usr/lib/oracle/19.3/client64/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib/oracle/19.3/client64/lib
export TNS_ADMIN=/usr/lib/oracle/19.3/client64/lib/network/admin
sqlplus 'username/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myrdsinstance.rds.amazonaws.com)(PORT=1521))(CONNECT_DATA=(SID=ORCL)))' @my_sql_script.sql
'''
}
I want to pass the variables in place of username, password, host and port. I put username, host & port within Env block in the top of the jenkinsfile. I retrieve the password dynamically.
I tried “dollar symbol username” or ${username} or env.DB_USER but it takes as is. Any idea?