You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once the command is done, you will find your connector image in your local docker registry: `airbyte/destination-vectara:dev`.
92
+
93
+
##### Customizing our build process
94
+
When contributing on our connector you might need to customize the build process to add a system dependency or set an env var.
95
+
You can customize our build process by adding a `build_customization.py` module to your connector.
96
+
This module should contain a `pre_connector_install` and `post_connector_install` async function that will mutate the base image and the connector container respectively.
97
+
It will be imported at runtime by our build process and the functions will be called if they exist.
98
+
99
+
Here is an example of a `build_customization.py` module:
100
+
```python
101
+
from__future__import annotations
102
+
103
+
from typing importTYPE_CHECKING
104
+
105
+
ifTYPE_CHECKING:
106
+
# Feel free to check the dagger documentation for more information on the Container object and its methods.
This connector is built using our dynamic built process in `airbyte-ci`.
84
120
The base image used to build it is defined within the metadata.yaml file under the `connectorBuildOptions`.
85
121
The build logic is defined using [Dagger](https://dagger.io/)[here](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/pipelines/builds/python_connectors.py).
@@ -88,7 +124,6 @@ It does not rely on a Dockerfile.
88
124
If you would like to patch our connector and build your own a simple approach would be to:
89
125
90
126
1. Create your own Dockerfile based on the latest version of the connector image.
91
-
92
127
```Dockerfile
93
128
FROM airbyte/destination-vectara:latest
94
129
@@ -99,17 +134,14 @@ RUN pip install ./airbyte/integration_code
Please use this as an example. This is not optimized.
104
138
105
139
2. Build your image:
106
-
107
140
```bash
108
141
docker build -t airbyte/destination-vectara:dev .
109
142
# Running the spec command against your patched connector
110
143
docker run airbyte/destination-vectara:dev spec
111
144
```
112
-
113
145
#### Run
114
146
115
147
Then run any of the connector commands as follows:
@@ -172,4 +204,4 @@ You've checked out the repo, implemented a million dollar feature, and you're re
172
204
4. Make the connector documentation and its changelog is up to date (`docs/integrations/destinations/vectara.md`).
173
205
5. Create a Pull Request: use [our PR naming conventions](https://docs.airbyte.com/contributing-to-airbyte/resources/pull-requests-handbook/#pull-request-title-convention).
174
206
6. Pat yourself on the back for being an awesome contributor.
175
-
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
207
+
7. Someone from Airbyte will take a look at your PR and iterate with you to merge it into master.
0 commit comments