Last active
December 16, 2015 20:02
-
-
Save ishults/304c0fe992a5c6373821 to your computer and use it in GitHub Desktop.
Sample Jenkins script to dynamically create a database and then pass it to Grails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Exports | |
export GRAILS_HOME=/path/to/grails | |
export PATH=$PATH:${GRAILS_HOME}/bin | |
export PSQL_HOME=/Library/PostgreSQL/9.3 | |
export PATH=$PATH:${PSQL_HOME}/bin | |
export PGPASSWORD=yourPass # Ideally this should live in the .pgpass file | |
# Create the database | |
createdb test_db${BUILD_NUMBER} --owner=yourOwner --username=yourUser | |
# Run the tests | |
grails clean | |
grails test-app -integration -Dtest.suffix=${BUILD_NUMBER} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment