File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,20 @@ def _build_image(
6363
6464 Raises: ConnectorImageBuildError if the build fails.
6565 """
66+ connector_name = metadata .data .dockerRepository .split ("/" )[- 1 ]
6667 if metadata .data .language == ConnectorLanguage .JAVA :
6768 # For Java connectors, the context directory is the repo root.
6869 context_dir = context_dir .parent .parent .parent
70+ # For Java connectors, we need to build the connector tar file first.
71+ response : subprocess .CompletedProcess [str ] = subprocess .run (
72+ [
73+ "./gradlew" ,
74+ f":airbyte-integrations:connectors:{ connector_name } :distTar" ,
75+ ],
76+ cwd = context_dir ,
77+ text = True ,
78+ check = True ,
79+ )
6980
7081 docker_args : list [str ] = [
7182 "docker" ,
Original file line number Diff line number Diff line change 149149 chown airbyte:airbyte /airbyte/base.sh /airbyte/javabase.sh /airbyte/dd-java-agent.jar
150150
151151# Set environment variables
152+ # These variables tell base.sh what to do:
152153ENV AIRBYTE_SPEC_CMD="/airbyte/javabase.sh --spec"
153154ENV AIRBYTE_CHECK_CMD="/airbyte/javabase.sh --check"
154155ENV AIRBYTE_DISCOVER_CMD="/airbyte/javabase.sh --discover"
155156ENV AIRBYTE_READ_CMD="/airbyte/javabase.sh --read"
156157ENV AIRBYTE_WRITE_CMD="/airbyte/javabase.sh --write"
158+
159+ # base.sh will set the classpath for the connector and invoke javabase.sh
160+ # using one of the above commands.
157161ENV AIRBYTE_ENTRYPOINT="/airbyte/base.sh"
158162ENV APPLICATION="${CONNECTOR_KEBAB_NAME}"
159163
You can’t perform that action at this time.
0 commit comments