From 657d3d3705488f885a330a99f8a7ceee16de1efd Mon Sep 17 00:00:00 2001 From: stewartbryson Date: Wed, 5 Jul 2023 17:13:12 +0000 Subject: [PATCH] Updating README and examples. --- README.md | 30 +++++++++++------------ examples/groovy/build.gradle | 2 +- examples/java-external-stage/build.gradle | 2 +- examples/java-testing/build.gradle | 4 +-- examples/java/build.gradle | 2 +- examples/kotlin/build.gradle | 2 +- examples/scala/build.gradle | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 5b5bd14..0c4e74a 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ is automatically applied by the `snowflake` plugin: ```groovy plugins { id 'java' - id 'io.github.stewartbryson.snowflake' version '2.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' } ``` @@ -216,7 +216,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.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' } ``` @@ -293,11 +293,11 @@ functionalTest(JvmTestSuite) { all { useSpock('2.3-groovy-3.0') dependencies { - implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.1.0" + implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.1.1" } testTask.configure { failFast true - // which SnowSQL connection to use + // which credentials connection to use systemProperty 'connection', project.snowflake.connection } } @@ -356,11 +356,11 @@ SampleTest Test adding 1 and 2 PASSED Test adding 3 and 4 PASSED -SUCCESS: Executed 2 tests in 462ms +SUCCESS: Executed 2 tests in 481ms > Task :snowflakeJvm -Using snowsql config file: /Users/stewartbryson/.snowsql/config +Using credentials config file: /Users/stewartbryson/.snowflake/config.toml File java-testing-0.1.0-all.jar: UPLOADED Deploying ==> CREATE OR REPLACE function add_numbers (a integer, b integer) @@ -374,13 +374,13 @@ CREATE OR REPLACE function add_numbers (a integer, b integer) SnowflakeSampleTest - Test ADD_NUMBERS() function with 1 and 2 PASSED + Test ADD_NUMBERS() function with 1 and 2 PASSED (1.1s) Test ADD_NUMBERS() function with 3 and 4 PASSED -SUCCESS: Executed 2 tests in 3.4s +SUCCESS: Executed 2 tests in 3.8s -BUILD SUCCESSFUL in 9s +BUILD SUCCESSFUL in 11s 11 actionable tasks: 7 executed, 4 up-to-date ``` @@ -435,7 +435,7 @@ functionalTest(JvmTestSuite) { } testTask.configure { failFast true - // which SnowSQL connection to use + // which credentials connection to use systemProperty 'connection', project.snowflake.connection // if this is ephemeral, the test spec needs the name to connect to if (project.snowflake.useEphemeral) { @@ -454,7 +454,7 @@ We can simulate a GitHub Actions environment just by setting the `GITHUB_ACTIONS ❯ ./gradlew functionalTest > Task :createEphemeral -Using snowsql config file: /Users/stewartbryson/.snowsql/config +Using credentials config file: /Users/stewartbryson/.snowflake/config.toml Ephemeral clone EPHEMERAL_JAVA_TESTING_PR_4 created. > Task :snowflakeJvm @@ -493,7 +493,7 @@ ephemeralName = 'testing_db' ❯ ./gradlew functionalTest > Task :createEphemeral -Using snowsql config file: /Users/stewartbryson/.snowsql/config +Using credentials config file: /Users/stewartbryson/.snowflake/config.toml Ephemeral clone testing_db created. > Task :snowflakeJvm @@ -596,7 +596,7 @@ including `publishSnowflakePublicationToS3_mavenRepository` which uploads the ar console output to that effect: ``` -❯ gradle snowflakeJvm --no-build-cache --console plain +❯ ./gradlew snowflakeJvm --no-build-cache --console plain > Task :gradle-snowflake:gradle-snowflake-plugin:compileJava NO-SOURCE > Task :gradle-snowflake:gradle-snowflake-plugin:compileGroovy UP-TO-DATE > Task :gradle-snowflake:gradle-snowflake-plugin:pluginDescriptors UP-TO-DATE @@ -615,7 +615,7 @@ console output to that effect: > Task :publishSnowflakePublicationToS3_mavenRepository > Task :snowflakeJvm -Using snowsql config file: /Users/stewartbryson/.snowsql/config +Using credentials config file: /Users/stewartbryson/.snowflake/config.toml Deploying ==> CREATE OR REPLACE function add_numbers (a integer, b integer) returns string @@ -677,7 +677,7 @@ BUILD SUCCESSFUL in 1s The `functionalTest` task contains all the tests that actually make a connection to Snowflake and test a deployment, except those involved with external stages. -You need to add a connection in `~/.snowsql/config` called `gradle_plugin`. +You need to add a connection in `~/.snowflake/config.toml` called `gradle_plugin`. > WARNING: Ensure that the credentials you provide in `gradle_plugin` are safe for development purposes. The `integrationTest` task requires the following external stages to exist in your Snowflake account: diff --git a/examples/groovy/build.gradle b/examples/groovy/build.gradle index 147a5d8..afc9e0c 100644 --- a/examples/groovy/build.gradle +++ b/examples/groovy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'groovy' id 'com.github.ben-manes.versions' version '0.47.0' - id 'io.github.stewartbryson.snowflake' version '2.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' } repositories { diff --git a/examples/java-external-stage/build.gradle b/examples/java-external-stage/build.gradle index 6f04964..ad90caa 100644 --- a/examples/java-external-stage/build.gradle +++ b/examples/java-external-stage/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'com.github.ben-manes.versions' version '0.47.0' - id 'io.github.stewartbryson.snowflake' version '2.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' } repositories { diff --git a/examples/java-testing/build.gradle b/examples/java-testing/build.gradle index 4376be4..97d083d 100644 --- a/examples/java-testing/build.gradle +++ b/examples/java-testing/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'groovy' // needed for Spock testing framework - id 'io.github.stewartbryson.snowflake' version '2.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' id 'com.adarshr.test-logger' version '3.2.0' // added for testing id 'com.github.ben-manes.versions' version '0.47.0' } @@ -43,7 +43,7 @@ testing { all { useSpock('2.3-groovy-3.0') dependencies { - implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.1.0" + implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.1.1" } testTask.configure { failFast true diff --git a/examples/java/build.gradle b/examples/java/build.gradle index 5591c34..6396e68 100644 --- a/examples/java/build.gradle +++ b/examples/java/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'com.github.ben-manes.versions' version '0.47.0' - id 'io.github.stewartbryson.snowflake' version '2.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' } repositories { diff --git a/examples/kotlin/build.gradle b/examples/kotlin/build.gradle index 8e486df..d816801 100644 --- a/examples/kotlin/build.gradle +++ b/examples/kotlin/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.jetbrains.kotlin.jvm" version "1.8.21" id 'com.github.ben-manes.versions' version '0.47.0' - id 'io.github.stewartbryson.snowflake' version '2.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' } repositories { diff --git a/examples/scala/build.gradle b/examples/scala/build.gradle index ccfde2d..02bdb1f 100644 --- a/examples/scala/build.gradle +++ b/examples/scala/build.gradle @@ -1,7 +1,7 @@ plugins { id 'scala' id 'com.github.ben-manes.versions' version '0.47.0' - id 'io.github.stewartbryson.snowflake' version '2.1.0' + id 'io.github.stewartbryson.snowflake' version '2.1.1' } repositories {