Skip to content

Commit 2d43922

Browse files
Merge pull request #83 from stewartbryson/stewart
README.md
2 parents 333f612 + 51099db commit 2d43922

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/markdown/README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ recreated if its signature changed.
3939
I wanted an experience using Snowflake that is as natural to developers using IntelliJ or VS Code for standard Java
4040
projects.
4141

42-
# The Snowflake Plugin
42+
# The Gradle Snowflake Plugin
4343

4444
This plugin provides easy configuration options for those getting started with Gradle but also provides advanced
4545
features 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
146146
Unfortunately, it doesn't yet look for a config file in all the places that SnowSQL does.
147147
Instead, 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

153153
The nested
154154
[`applications` DSL](https://s3.amazonaws.com/stewartbryson.docs/gradle-snowflake/latest/io/github/stewartbryson/ApplicationContainer.html)
@@ -327,7 +327,7 @@ functionalTest(JvmTestSuite) {
327327
I'll walk through a few of these points.
328328
So that the `SnowflakeSpec` is available in the test classpath, we have to declare the plugin as a dependency
329329
to 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.
331331
Additionally, our test specs are unaware of all the configurations of our Gradle build, so we have to pass our `connection`
332332
property 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+
419422
Our build file change to enable ephemeral testing:
420423
```groovy
421424
snowflake {
@@ -437,6 +440,7 @@ The `useEphemeral` property will determine whether the `createEphemeral` and `dr
437440
are added at the beginning and end of the build, respectively.
438441
This allows for the `functionalTest` task to be run in the ephemeral clone just after our application is published.
439442
We'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.
440444
Remember that our `SnowflakeSpec` class doesn't automatically know the details of our build, so we have to provide
441445
the ephemeral name using java system properties. Here is our modified testing suite:
442446

@@ -502,7 +506,7 @@ BUILD SUCCESSFUL in 6s
502506
```
503507

504508
When 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.
506510
If 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
545549
13 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
549553
This option is useful when you want your artifacts available to consumers other than just Snowflake without publishing
550554
them to disparate locations.
551555
Gradle 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.
666670
the `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.
670674
To make changes to the `README.md` file, please make them in the [master README file](src/markdown/README.md) instead.
671675
The 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
698702
The `functionalTest` task contains all the tests that actually make a connection to Snowflake and test a deployment,
699703
except those involved with external stages.
700704
You 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

Comments
 (0)