Skip to content

Instantly share code, notes, and snippets.

@etexier
Last active December 28, 2015 09:09
Show Gist options
  • Select an option

  • Save etexier/7476355 to your computer and use it in GitHub Desktop.

Select an option

Save etexier/7476355 to your computer and use it in GitHub Desktop.
test
// This is a sample recipe
println "\nTHIS IS SAMPLE SCRIPT:"
println "\nLET'S CREATE A SAMPLE HELLOWORLD PROJECT FROM A ZIP LOCATED ON DROPBOX...\n"
println "\nCalling 'project-create -o temp -DartifactId=helloworldproject -qf -p https://dl.dropboxusercontent.com/u/23850645/helloworld.zip'\n"
project-create -o temp -DartifactId=helloworldproject -qf -p https://dl.dropboxusercontent.com/u/23850645/helloworld.zip
println ("\nDone creating project temp. Go to " + new File("temp").absolutePath + "\n")
println ("\nNOW LET'S BUILD IT using 'pb -DskipTests=true -T 1.5C'...")
Thread.sleep(4000)
pb -DskipTests=true -T 1.5C
println ("\nCOMPILATION DONE. LET'S RE-INITIALIZE THE DB with 'db-drop' and 'db-initialize'...\n")
db-drop -q
db-initialize -q
println ("\nDONE, NOW LET'S START THE SERVER with 'server-start'...\n")
server-start
println ("\nDONE. LET'S CHECK THE LOGS with 'server-log'...")
Thread.sleep(4000)
server-log
Thread.sleep(2000)
println("\nLOOKS GOOD...\n")
Thread.sleep(4000)
println("\nLET'S CREATE A USER with 'user-create magnet password'...")
user-create magnet password
Thread.sleep(1000)
println("\nNOW TEST THE HELLOWORLD CONTROLLER USING THIS USER WITH CURL..\n")
Thread.sleep(4000)
x curl http://localhost:8080/rest/hello?param0=Jack -u 'magnet:password'
println()
Thread.sleep(2000)
println("\nDID YOU GET 'Hello Jack'? GOOD.\n")
Thread.sleep(2000)
println("NOW, LET'S CLEAN UP BY STOPPING THE SERVER...\n")
Thread.sleep(4000)
server-stop
println("\nSERVER IS STOPPED. WE'RE ALMOST DONE: YOU CAN DELETE THE PROJECT WITH 'project-delete'. (Answer 'y' to delete it).\n")
project-delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment