Introduce the airbyte gradle docker plugin to build JVM connectors.
Add logic to allow us to slowly migrate from one build set up to the other.
The majority of the work is taking in the metadata.yaml file, and converting that to buildArgs to be injected into the airbyte gradle docker plugin.
In particular, we extract the base image from the metadata file. We also add the connector name by referencing the module. This outputs a file buildArgs.properties into the build folder. This is done by the DockerGenerateConnectorBuildArgs task.
The AirbyteDockerConventionPlugin then takes in the generated buildArgs.properties file and feeds it into the Platform Docker plugin. It also feeds in the top-level Dockerfile, so the Docker plugin can copy it into the build folder.
I tried to migrate this to Kotlin, however the repo needs to be upgraded to the same Kotlin and KSP version as the gradle plugin repos for this to be worth while. Otherwise we end up writing kotlin plugins with reflection, which is worse than the current groovy plugins.
* upgrade to gradle 7.2
* get build working with gradle 7.2
* fix build
* fix connector build?
* EXCLUDE distTar and switch includes to excludes
* switch back to includes
* temporarily try to adjust properties
* don't know why this was modified
* revert spotless upgrade
* upgrade gradle node (better arm support it says)
* add back in Xss since we are getting StackOverflowError without it
* revert bad spotless fmt
* fix acceptance tests duplicates strategy
* add zip for jdbc includes
* check if this helps for java connectors
* remove accidental commit
* remove redundant
* fix warning explosion
* oops
* override gradle.properties
* remove set-env
This is what the plugin's maintainer suggested: xvik/gradle-use-python-plugin#19.
I ran the build 10 times in a row without any checkPython error so this does seem to have fixed it.
* support cached builds for base -> base-java -> snowflake
* use plugin for image building
* fix matching on COPY from
* remove docker.gradle
* tmp commit
* update connectors
* finish rest of build files
* fix ide errors
* more build fixes
* clean up
* clean up for new soruces
* fix spotless
* fix flake problems
* add recommended empty file
* python caching
* fixes upon review
* clean up docker and build test files
* clean up python
* clean up
* fix integration test dependencies
* fix standard tests
* fix
* remove symlink
* re-add requirements to fix normalizatioon build
* fix symlink
* fix dumbest build problem of all
* add missing integration test def
* fix missing dep
* remove class exclusion
* move trim so null source versions are allowed
* rename map
* fix hardcoded value
* remove unnecessary dep
* use dashes for salesforce package name
* fix typo
* DRY and fix test image name
* Fix edit
* assert string is not empty
* build integration test image only for integrationTest
* move code generator to tools and rename docker build tasks
* make source test depend on integration test build, not the other way
* remove guard because the docker build should exist before the integrationtest is applied
* remove comment
* DRY up airbyte-source-test
* fix plugin compilation
* add missing dependency
* rename getTaggedImage to getDevTaggedImage
* fix test vs main docker build bug