forked from classmethod/gradle-aws-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add salmon build archive and extra Lambda tasks
- Loading branch information
Showing
24 changed files
with
744 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.35 | ||
0.36 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apply plugin: 'maven' | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
repository(url: uri('./repo')) | ||
} | ||
} | ||
|
||
} |
Binary file added
BIN
+385 KB
...-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty-javadoc.jar
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty-javadoc.jar.md5
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a97a4fd174682d8e0ef57236c567cd55 |
1 change: 1 addition & 0 deletions
1
...8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty-javadoc.jar.sha1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
020d58ec59800ce42e12c61e7ece93282098752f |
Binary file added
BIN
+135 KB
...-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty-sources.jar
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty-sources.jar.md5
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
af77ceeb9af0a03ca3d2b11e789bf955 |
1 change: 1 addition & 0 deletions
1
...8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty-sources.jar.sha1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
22c1a55cda2f8c92a66f5fc3a2b5f40bb985a3d3 |
Binary file added
BIN
+210 KB
...gin/0.35-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty.jar
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...0.35-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty.jar.md5
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
496df09292a82060f0114e249c3ac261 |
1 change: 1 addition & 0 deletions
1
....35-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty.jar.sha1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
703fd1c71e5b7263d30bf847599efc2777621299 |
130 changes: 130 additions & 0 deletions
130
...gin/0.35-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty.pom
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.salmon.aws</groupId> | ||
<artifactId>gradle-aws-plugin</artifactId> | ||
<version>0.35-24-g8b020d9-SNAPSHOT+dirty</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>18.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>1.4</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.16.2</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-sts</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-s3</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-ec2</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-rds</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-route53</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-elasticloadbalancing</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-elasticbeanstalk</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-cloudformation</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-lambda</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-iam</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-sqs</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-sns</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-ecr</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.amazonaws</groupId> | ||
<artifactId>aws-java-sdk-ssm</artifactId> | ||
<version>1.11.116</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<version>1.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>1.9.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
1 change: 1 addition & 0 deletions
1
...0.35-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty.pom.md5
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
7185a680f0bdc4feef3ab7fd3b262f37 |
1 change: 1 addition & 0 deletions
1
....35-24-g8b020d9-SNAPSHOT+dirty/gradle-aws-plugin-0.35-24-g8b020d9-SNAPSHOT+dirty.pom.sha1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
98410c7840838a988b8de2eab62641c904631a07 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<metadata> | ||
<groupId>com.salmon.aws</groupId> | ||
<artifactId>gradle-aws-plugin</artifactId> | ||
<versioning> | ||
<release>0.35-24-g8b020d9-SNAPSHOT+dirty</release> | ||
<versions> | ||
<version>0.35-24-g8b020d9-SNAPSHOT+dirty</version> | ||
</versions> | ||
<lastUpdated>20170724060213</lastUpdated> | ||
</versioning> | ||
</metadata> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c67c933cac7a2ee0006e7a7e697850c4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
623c5d84733012197799314c25aa7b5daef1a655 |
88 changes: 88 additions & 0 deletions
88
src/main/java/jp/classmethod/aws/gradle/lambda/AWSLambdaCreateAliasTask.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* Copyright 2015-2016 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package jp.classmethod.aws.gradle.lambda; | ||
|
||
import java.io.IOException; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import org.gradle.api.GradleException; | ||
import org.gradle.api.internal.ConventionTask; | ||
import org.gradle.api.tasks.TaskAction; | ||
|
||
import com.amazonaws.services.lambda.AWSLambda; | ||
import com.amazonaws.services.lambda.model.CreateAliasRequest; | ||
import com.amazonaws.services.lambda.model.CreateAliasResult; | ||
|
||
public class AWSLambdaCreateAliasTask extends ConventionTask { | ||
|
||
@Getter | ||
@Setter | ||
private String functionName; | ||
|
||
@Getter | ||
@Setter | ||
private String functionVersion; | ||
|
||
@Getter | ||
@Setter | ||
private String aliasDescription; | ||
|
||
@Getter | ||
@Setter | ||
private String aliasName; | ||
|
||
@Getter | ||
private CreateAliasResult createAliasResult; | ||
|
||
|
||
public AWSLambdaCreateAliasTask() { | ||
setDescription("Create Lambda Alias."); | ||
setGroup("AWS"); | ||
} | ||
|
||
@TaskAction | ||
public void createAlias() throws IOException { | ||
// to enable conventionMappings feature | ||
String aliasName = getAliasName(); | ||
String functionName = getAliasName(); | ||
String functionVersion = getAliasName(); | ||
|
||
if (aliasName == null) { | ||
throw new GradleException("aliasName is required"); | ||
} | ||
|
||
if (functionName == null) { | ||
throw new GradleException("functionName is required"); | ||
} | ||
|
||
if (functionVersion == null) { | ||
throw new GradleException("functionVersion is required"); | ||
} | ||
|
||
AWSLambdaPluginExtension ext = getProject().getExtensions().getByType(AWSLambdaPluginExtension.class); | ||
AWSLambda lambda = ext.getClient(); | ||
|
||
CreateAliasRequest request = new CreateAliasRequest() | ||
.withName(getAliasName()) | ||
.withDescription(getAliasDescription()) | ||
.withFunctionName(getFunctionName()) | ||
.withFunctionVersion(getFunctionVersion()); | ||
createAliasResult = lambda.createAlias(request); | ||
getLogger().info("Create Lambda alias requested: {}", createAliasResult.getAliasArn()); | ||
} | ||
} |
Oops, something went wrong.