List of usage examples for com.amazonaws.services.elasticbeanstalk AWSElasticBeanstalk createStorageLocation
CreateStorageLocationResult createStorageLocation();
From source file:jp.classmethod.aws.gradle.elasticbeanstalk.AWSElasticBeanstalkUploadBundleTask.java
License:Apache License
@Override public void upload() throws IOException { Project project = getProject();//from w ww.j a v a2 s.c o m AwsBeanstalkPluginExtension ext = project.getExtensions().getByType(AwsBeanstalkPluginExtension.class); AWSElasticBeanstalk eb = ext.getClient(); SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd'_'HHmmss", Locale.ENGLISH); df.setTimeZone(TimeZone.getDefault()); versionLabel = String.format(Locale.ENGLISH, "%s-%s", project.getVersion().toString(), df.format(new Date())); String artifactId = project.property("artifactId").toString(); setBucketName(eb.createStorageLocation().getS3Bucket()); setKey(String.format(Locale.ENGLISH, "eb-apps/%s/%s-%s.%s", new Object[] { artifactId, artifactId, versionLabel, extension })); super.upload(); }
From source file:org.xmlsh.aws.gradle.elasticbeanstalk.AWSElasticBeanstalkUploadBundleTask.java
License:BSD License
@Override public void upload() throws IOException { Project project = getProject();/*from w w w.j a va 2 s.com*/ AwsBeanstalkPluginExtension ext = project.getExtensions().getByType(AwsBeanstalkPluginExtension.class); AWSElasticBeanstalk eb = ext.getClient(); SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd'_'HHmmss"); df.setTimeZone(TimeZone.getDefault()); versionLabel = String.format("%s-%s", project.getVersion().toString(), df.format(new Date())); String artifactId = project.property("artifactId").toString(); setBucketName(eb.createStorageLocation().getS3Bucket()); setKey(String.format("eb-apps/%s/%s-%s.%s", new Object[] { artifactId, artifactId, versionLabel, extension })); super.upload(); }