Skip to content

Commit

Permalink
Upgrading to Localstack 0.12.10 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregwhitaker authored May 2, 2021
1 parent c050b4a commit 440d594
Show file tree
Hide file tree
Showing 16 changed files with 108 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ All notable changes to `gradle-localstack` will be documented in this file.
#### Version 0.1.0 - September 2020

- Initial Release

#### Version 0.2.0 - May 2021

- Upgrade to LocalStack 0.12.10
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The plugin can be applied with either the plugin or legacy buildscript DSL. For
### Applying the Plugin with Plugin DSL
```
plugins {
id "com.nike.pdm.localstack" version "0.1.0"
id "com.nike.pdm.localstack" version "0.2.0"
}
```

Expand All @@ -37,7 +37,7 @@ buildscript {
}
}
dependencies {
classpath "gradle.plugin.com.nike.pdm.localstack:gradle-localstack-plugin:0.1.0"
classpath "gradle.plugin.com.nike.pdm.localstack:gradle-localstack-plugin:0.2.0"
}
}
Expand All @@ -64,7 +64,7 @@ the LICENSE file in the root directory of this source tree.
[docs img]:https://img.shields.io/badge/Documentation-yes-green.svg

[pluginportal]:https://plugins.gradle.org/plugin/com.nike.pdm.localstack
[pluginportal img]:https://img.shields.io/badge/Gradle%20Plugin%20Portal-v0.1.0-blue.svg
[pluginportal img]:https://img.shields.io/badge/Gradle%20Plugin%20Portal-v0.2.0-blue.svg

[license]:LICENSE.txt
[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg
Empty file added docs/.nojekyll
Empty file.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ <h4 id="applying_the_plugin_using_the_buildscript_syntax"><a class="anchor" href
gradlePluginPortal()
}
dependencies {
classpath 'com.nike.pdm.localstack:0.1.0'
classpath 'com.nike.pdm.localstack:0.2.0'
}
}

Expand All @@ -581,7 +581,7 @@ <h4 id="applying_the_plugin_using_the_plugin_dsl"><a class="anchor" href="#apply
<div class="title">Groovy</div>
<div class="content">
<pre class="prettyprint highlight"><code data-lang="groovy">plugins {
id "com.nike.pdm.localstack" version "0.1.0"
id "com.nike.pdm.localstack" version "0.2.0"
}</code></pre>
</div>
</div>
Expand Down
26 changes: 26 additions & 0 deletions gradle-localstack-plugin-example/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Markdown files sometimes need trailing whitespaces.
[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

[gradle/verification-metadata.xml]
indent_size = 3
2 changes: 1 addition & 1 deletion gradle-localstack-plugin-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: "com.nike.pdm.localstack"

// Project Configuration
project.group = "com.nike.pdm.localstack"
project.version = "0.1.0"
project.version = "0.2.0"
project.description = "Example project that demonstrates the use of the Gradle LocalStack Plugin"

// Version Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.5'

services:
localstack:
image: localstack/localstack:0.11.3
image: localstack/localstack:0.12.10
ports:
- '4566:4566' # LocalStack Edge
environment:
Expand Down
26 changes: 26 additions & 0 deletions gradle-localstack-plugin/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Markdown files sometimes need trailing whitespaces.
[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

[gradle/verification-metadata.xml]
indent_size = 3
4 changes: 2 additions & 2 deletions gradle-localstack-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The plugin can be applied with either the plugin or legacy buildscript DSL. For
#### Applying the Plugin with Plugin DSL
```
plugins {
id "com.nike.pdm.localstack" version "0.1.0"
id "com.nike.pdm.localstack" version "0.2.0"
}
```

Expand All @@ -31,7 +31,7 @@ buildscript {
}
}
dependencies {
classpath "gradle.plugin.com.nike.pdm.localstack:gradle-localstack-plugin:0.1.0"
classpath "gradle.plugin.com.nike.pdm.localstack:gradle-localstack-plugin:0.2.0"
}
}
Expand Down
5 changes: 5 additions & 0 deletions gradle-localstack-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ dependencies {
testImplementation "com.github.docker-java:docker-java-transport-httpclient5:3.2.5"
testImplementation "com.github.stefanbirkner:system-rules:1.19.0"
testImplementation "com.sun.istack:istack-commons-runtime:3.0.11"
testImplementation "org.yaml:snakeyaml:1.28"
}

// Test Configuration
Expand Down Expand Up @@ -113,6 +114,10 @@ task buildDocSite(type: Copy) {
from ("${buildDir}/docs/javadoc") {
into "javadoc"
}

doLast {
new File("../docs/.nojekyll").createNewFile()
}
}

task cleanDocSite(type: Delete) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ buildscript {
gradlePluginPortal()
}
dependencies {
classpath 'com.nike.pdm.localstack:0.1.0'
classpath 'com.nike.pdm.localstack:0.2.0'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id "com.nike.pdm.localstack" version "0.1.0"
id "com.nike.pdm.localstack" version "0.2.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ComposeFile {
services:
localstack:
image: localstack/localstack:0.11.3
image: localstack/localstack:0.12.10
container_name: gradle-localstack-plugin-test
ports:
- '4566:4566' # LocalStack Edge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class LocalStackDockerTestUtil {
private static final Logger LOG = LoggerFactory.getLogger(LocalStackDockerTestUtil.class);
private static final String LOCALSTACK_TEST_DOCKER_CONTAINER_NAME = "/gradle-localstack-plugin-test";
private static final String LOCALSTACK_TEST_IMAGE_NAME = "localstack/localstack";
private static final String LOCALSTACK_TEST_DOCKER_TAG = "0.11.3";
private static final String LOCALSTACK_TEST_DOCKER_TAG = "0.12.10";

private final DockerClient dockerClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.5'

services:
localstack:
image: localstack/localstack:0.11.3
image: localstack/localstack:0.12.10
ports:
- '4566:4566' # LocalStack Edge
environment:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright 2020-present, Nike, Inc.
* All rights reserved.
*
* This source code is licensed under the Apache-2.0 license found in
* the LICENSE file in the root directory of this source tree.
*/
package com.nike.pdm.localstack;

import org.junit.Test;
import org.yaml.snakeyaml.Yaml;

import java.io.InputStream;
import java.util.LinkedHashMap;
import java.util.Map;

import static org.junit.Assert.*;

public class VersionSanityCheck {
private static final String CURRENT_LOCALSTACK_VERSION = "0.12.10";

@Test
public void shouldHaveCorrectLocalStackVersion() {
InputStream composeFileStream = this.getClass().getClassLoader().getResourceAsStream("localstack-docker-compose.yml");

Yaml yaml = new Yaml();
Map<String, LinkedHashMap> services = yaml.load(composeFileStream);
Map<String, String> localStackService = (Map<String, String>) services.get("services").get("localstack");
String image = localStackService.get("image");

assertTrue(image.endsWith(":" + CURRENT_LOCALSTACK_VERSION));
}
}

0 comments on commit 440d594

Please sign in to comment.