Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # env is a UNIX command used here to print a list of environment variables like JENKINS_HOME
- env
- # sed is a UNIX command used to search, find and replay, insert or delete any stream of data. So here we are finding and replacing the #location of the database from localhost to RDS endpoint and name of the database from moviedb to postgresdb
- sed -i -e 's#jdbc:postgresql://localhost:5432/moviedb#jdbc:postgresql://postgresdb.cnslxnballye.us-east-1.rds.amazonaws.com:5432/postgresdb#g' /var/lib/jenkins/workspace/${JOB_NAME}/movieapp-api/src/main/resources/application.yml
- # Here cat command is used to read the application.yml file
- cat ${JENKINS_HOME}/workspace/${JOB_NAME}/movieapp-api/src/main/resources/application.yml
Add Comment
Please, Sign In to add comment