raziakram

Untitled

Oct 9th, 2018
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.73 KB | None | 0 0
  1. #!/bin/bash
  2. # env is a UNIX command used here to print a list of environment variables like JENKINS_HOME
  3. env
  4.  
  5. # 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
  6. 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
  7.  
  8. # Here cat command is used to read the application.yml file
  9. cat ${JENKINS_HOME}/workspace/${JOB_NAME}/movieapp-api/src/main/resources/application.yml
Add Comment
Please, Sign In to add comment