@@ -39,7 +39,7 @@ recreated if its signature changed.
3939I wanted an experience using Snowflake that is as natural to developers using IntelliJ or VS Code for standard Java
4040projects.
4141
42- # The Snowflake Plugin
42+ # The Gradle Snowflake Plugin
4343
4444This plugin provides easy configuration options for those getting started with Gradle but also provides advanced
4545features for teams already using Gradle in other areas of the organization.
@@ -146,9 +146,9 @@ It first loads all the default values, and replaces any values from the connecti
146146Unfortunately, it doesn't yet look for a config file in all the places that SnowSQL does.
147147Instead, it looks in this order:
148148
149- 1 . ` <HOME_DIR>/.snowsql/ config`
150- 2 . ` ./snow- config` (Useful in CI/CD pipelines, where secrets can be easily written to this file.)
151- 3 . A custom location of your choosing, configured with the ` --snow-config ` option in applicable tasks.
149+ 1 . A custom location of your choosing, configured with the ` --snow- config` option in applicable tasks.
150+ 2 . ` <HOME_DIR>/.snowsql/ config`
151+ 3 . ./snow-config` (Useful in CI/CD pipelines, where secrets can be easily written to this file.)
152152
153153The nested
154154[ ` applications ` DSL] ( https://s3.amazonaws.com/stewartbryson.docs/gradle-snowflake/latest/io/github/stewartbryson/ApplicationContainer.html )
@@ -327,7 +327,7 @@ functionalTest(JvmTestSuite) {
327327I'll walk through a few of these points.
328328So that the ` SnowflakeSpec ` is available in the test classpath, we have to declare the plugin as a dependency
329329to the test suite.
330- Notice that we use the library standard maven coordinates, which are different than the coordinates in the ` plugin ` DSL.
330+ Notice that we use the library maven coordinates, which are different from the coordinates in the ` plugin ` DSL.
331331Additionally, our test specs are unaware of all the configurations of our Gradle build, so we have to pass our ` connection `
332332property as a Java system property to the ` SnowflakeSpec ` class.
333333
@@ -416,6 +416,9 @@ The plugin is aware when it is running in CI/CD environments and currently suppo
416416* [ GitHub Actions] ( https://github.com/features/actions )
417417* [ Appveyor] ( https://www.appveyor.com )
418418
419+ Because the plugin is aware when executing in CICD environments, we expose that information through the DSL,
420+ and can use it to control our cloning behavior.
421+
419422Our build file change to enable ephemeral testing:
420423``` groovy
421424snowflake {
@@ -437,6 +440,7 @@ The `useEphemeral` property will determine whether the `createEphemeral` and `dr
437440are added at the beginning and end of the build, respectively.
438441This allows for the ` functionalTest ` task to be run in the ephemeral clone just after our application is published.
439442We've also added a little extra magic to keep the clone when building a pull request.
443+ The ` createEphemeral ` task issues a ` CREATE DATABASE... IF NOT EXISTS ` statement, so it exists from a prior run.
440444Remember that our ` SnowflakeSpec ` class doesn't automatically know the details of our build, so we have to provide
441445the ephemeral name using java system properties. Here is our modified testing suite:
442446
@@ -502,7 +506,7 @@ BUILD SUCCESSFUL in 6s
502506```
503507
504508When the CI/CD environment is detected, the plugin will name the ephemeral database clone based on the pull request
505- number, the branch name, or the tag name instead of the auto-generated name based on Gradle project .
509+ number, the branch name, or the tag name instead of an autogenerated one .
506510If we prefer to simply specify a clone name instead of relying on the plugin to generate it, that is supported as well:
507511
508512 ``` groovy
@@ -545,7 +549,7 @@ BUILD SUCCESSFUL in 7s
54554913 actionable tasks: 4 executed, 9 up-to-date
546550```
547551
548- # Auto-configuration of ` maven-publish ` with External Stages
552+ # Autoconfiguration of ` maven-publish ` with External Stages
549553This option is useful when you want your artifacts available to consumers other than just Snowflake without publishing
550554them to disparate locations.
551555Gradle has [ built-in support] ( https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:s3-repositories )
@@ -666,11 +670,11 @@ the plugin will ensure it matches the metadata for the `stage` property.
666670the ` CREATE OR REPLACE... ` statement.
667671
668672# Contributing
669- Anyone can contribute!
673+ Anyone can contribute! You don't need permission, my blessing, or expertise, clearly.
670674To make changes to the ` README.md ` file, please make them in the [ master README file] ( src/markdown/README.md ) instead.
671675The version tokens in this file are automatically replaced with the current value before publishing.
672676
673- Three different unit test tasks are defined:
677+ Three different testing tasks are defined:
674678```
675679❯ ./gradlew tasks --group verification
676680
@@ -698,9 +702,9 @@ BUILD SUCCESSFUL in 1s
698702The ` functionalTest ` task contains all the tests that actually make a connection to Snowflake and test a deployment,
699703except those involved with external stages.
700704You need to add a connection in ` ~/.snowsql/config ` called ` gradle_plugin ` .
701- > WARNING: Ensure that the credential you provide below are for a safe development database .
705+ > WARNING: Ensure that the credentials you provide in ` gradle_plugin ` are safe for development purposes .
702706
703- The ` integrationTest ` requires the following external stages to exist in your Snowflake account:
707+ The ` integrationTest ` task requires the following external stages to exist in your Snowflake account:
704708
705709* ` gcs_maven ` : An external stage in GCS.
706710* ` s3_maven ` : An external stage in S3.
0 commit comments