Skip to content

Commit

Permalink
Updating README and examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartbryson authored and github-actions[bot] committed May 19, 2023
1 parent 06a29db commit fe8c7ca
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 36 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ is automatically applied by the `snowflake` plugin:
```groovy
plugins {
id 'java'
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
}
```

Expand Down Expand Up @@ -234,7 +234,7 @@ Our `plugins` DSL from the build file:
plugins {
id 'java'
id 'groovy' // needed for Spock testing framework
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
}
```

Expand Down Expand Up @@ -299,7 +299,7 @@ The same applies for the topic of functional testing below.
### Functional Testing
[Functional testing](https://en.wikipedia.org/wiki/Functional_testing) describes what the system does,
and in my mind, this involves testing our deployed code in Snowflake.
Regardless of what we call it, we _know we need this_, and it's a crucial component in our build chain.
Regardless of what we call it, we _know we need this_ as a crucial component in our build chain.
This plugin contains a custom Spock Specification class called `SnowflakeSpec` that can be used in a new test suite.
By default, this test suite is called `functionalTest`, though the name can be configured using the `testSuite` property.

Expand All @@ -311,7 +311,7 @@ functionalTest(JvmTestSuite) {
all {
useSpock('2.3-groovy-3.0')
dependencies {
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.13"
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.14"
}
testTask.configure {
failFast true
Expand Down
2 changes: 1 addition & 1 deletion examples/groovy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'groovy'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/java-external-stage/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
}

repositories {
Expand Down
50 changes: 25 additions & 25 deletions examples/java-testing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
plugins {
id 'java'
id 'groovy' // needed for Spock testing framework
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
id 'com.adarshr.test-logger' version '3.2.0' // added for testing
id 'com.github.ben-manes.versions' version '0.46.0'
}

repositories {
mavenCentral()
gradlePluginPortal() // added for functionalTest dependency
mavenCentral()
gradlePluginPortal() // added for functionalTest dependency
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}

snowflake {
connection = 'gradle_plugin'
stage = 'upload'
// Explained in the Ephemeral Cloning section
useEphemeral = snowflake.isCI() // use ephemeral with CICD workflows
keepEphemeral = snowflake.isPR() // keep ephemeral for PRs
applications {
add_numbers {
inputs = ["a integer", "b integer"]
returns = "string"
handler = "Sample.addNum"
}
}
connection = 'gradle_plugin'
stage = 'upload'
// Explained in the Ephemeral Cloning section
useEphemeral = snowflake.isCI() // use ephemeral with CICD workflows
keepEphemeral = snowflake.isPR() // keep ephemeral for PRs
applications {
add_numbers {
inputs = ["a integer", "b integer"]
returns = "string"
handler = "Sample.addNum"
}
}
}

// Explained in the Testing section
Expand All @@ -43,14 +43,14 @@ testing {
all {
useSpock('2.3-groovy-3.0')
dependencies {
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.13"
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.14"
}
testTask.configure {
failFast true
// which SnowSQL connection to use
systemProperty 'connection', snowflake.connection
// if this is ephemeral, the test spec needs the name to connect to
if (project.snowflake.useEphemeral) {
if (snowflake.useEphemeral) {
systemProperty 'ephemeralName', snowflake.ephemeralName
}
}
Expand All @@ -60,13 +60,13 @@ testing {
}
}

version = '0.1.0'
version='0.1.0'

// empty task for matrix strategy execution in GitHub Actions
// please ignore
afterEvaluate {
tasks.register('matrixStrategy') {
description 'Empty task for matrix strategy execution in GitHub Actions.'
dependsOn functionalTest
}
tasks.register('matrixStrategy') {
description 'Empty task for matrix strategy execution in GitHub Actions.'
dependsOn functionalTest
}
}
2 changes: 1 addition & 1 deletion examples/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.8.21"
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
}

repositories {
Expand Down
7 changes: 4 additions & 3 deletions examples/scala/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'scala'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.13'
id 'io.github.stewartbryson.snowflake' version '2.0.14'
}

repositories {
Expand All @@ -18,8 +18,6 @@ java {
}
}

version='0.1.0'

snowflake {
connection = 'gradle_plugin'
stage = 'upload'
Expand All @@ -32,6 +30,9 @@ snowflake {
}
}

version='0.1.0'


// empty task for matrix strategy execution in GitHub Actions
// please ignore
afterEvaluate {
Expand Down

0 comments on commit fe8c7ca

Please sign in to comment.