// ./gradlew uploadWarAndStaticFileToS3 -‐Penv=dev -‐Ptag=R20140206 Util.needParams(project, "env", "tag") if(!env.equals("prod") && !env.equals("dev")){ throw new InvalidUserDataException(" env needs [prod] or [dev].") } // js,css,png etc.. to S3 for cloudfront def s3 = new AwsS3(bucketName: "cdn", project:project) s3.uploadStaticFiles(war.archivePath, tag) s3 = new AwsS3(bucketName:"app", project:project) // war, cloudfront.rc to S3 s3.uploadWarCloudfrontRcFile(war.archivePath, env, tag) }