Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v5.2 #170

Merged
merged 5 commits into from
Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.gradle

build
gradle
.idea
*.iml
/out
/out
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Unreleased

# v5.2

* [Issue #168](https://github.com/manheim/terraform-pipeline/issues/168) Fix typo in Jenkinsfile
* [Issue #171](https://github.com/manheim/terraform-pipeline/issues/171) Fix gradlew, so unit tests can run

# v5.1

* [Issue #156](https://github.com/manheim/terraform-pipeline/issues/156) Remove and ignore the build directory
Expand Down
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions src/BuildStage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BuildStage implements Stage, TerraformEnvironmentStagePlugin {
}

public void build() {
Jenkinsflie.build(pipelineConfiguration())
Jenkinsfile.build(pipelineConfiguration())
}

@Override
Expand All @@ -44,7 +44,7 @@ class BuildStage implements Stage, TerraformEnvironmentStagePlugin {
}
}

private Closure pipelineConfiguration() {
protected Closure pipelineConfiguration() {
applyPlugins()

return {
Expand Down
23 changes: 23 additions & 0 deletions test/BuildStageTest.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import org.junit.*
import org.junit.runner.RunWith
import de.bechte.junit.runners.context.HierarchicalContextRunner

import static org.mockito.Mockito.verify
import static org.mockito.Mockito.when
import static org.mockito.Mockito.spy
import static org.mockito.Mockito.doReturn

@RunWith(HierarchicalContextRunner.class)
class BuildStageTest {

public class Build {
@Test
void buildsWithoutError() {
BuildStage stage = spy(new BuildStage())

doReturn({ -> }).when(stage).pipelineConfiguration()

stage.build()
}
}
}