Skip to content

Commit 80a4273

Browse files
JDBC tests with secret
1 parent c621abb commit 80a4273

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

python/.ci/python-integration-tests.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,31 @@ steps:
194194
secretEnv: ['TEST_JDBC_URL']
195195
waitFor: ['build-and-upload']
196196

197+
198+
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
199+
id: jdbc-to-bigquery-with-secret
200+
env:
201+
- 'GCP_PROJECT=${_GCP_PROJECT}'
202+
- 'GCS_STAGING_LOCATION=${_GCS_STAGING_LOCATION_BASE}'
203+
- 'GCS_DEPS_BUCKET=${_GCS_DEPS_BUCKET}'
204+
- 'REGION=${_REGION}'
205+
- 'SKIP_BUILD=true'
206+
- 'JARS=gs://dataproc-templates_cloudbuild/integration-testing/jars/mysql-connector-java.jar'
207+
script: |
208+
#!/usr/bin/env bash
209+
cd python
210+
./bin/start.sh \
211+
-- --template=JDBCTOBIGQUERY \
212+
--jdbc.bigquery.input.url.secret="jdbctobqconn" \
213+
--jdbc.bigquery.input.driver="com.mysql.jdbc.Driver" \
214+
--jdbc.bigquery.input.table="test.demo" \
215+
--jdbc.bigquery.output.mode="overwrite" \
216+
--jdbc.bigquery.output.dataset="dataproc_templates_python" \
217+
--jdbc.bigquery.output.table="jdbc_to_bigquery_with_secret" \
218+
--jdbc.bigquery.temp.bucket.name=${GCS_DEPS_BUCKET}
219+
secretEnv: ['TEST_JDBC_URL']
220+
waitFor: ['build-and-upload']
221+
197222
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
198223
id: jdbc-to-gcs
199224
env:
@@ -217,6 +242,29 @@ steps:
217242
secretEnv: ['TEST_JDBC_URL']
218243
waitFor: ['build-and-upload']
219244

245+
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
246+
id: jdbc-to-gcs-with-secret
247+
env:
248+
- 'GCP_PROJECT=${_GCP_PROJECT}'
249+
- 'GCS_STAGING_LOCATION=${_GCS_STAGING_LOCATION_BASE}'
250+
- 'GCS_DEPS_BUCKET=${_GCS_DEPS_BUCKET}'
251+
- 'REGION=${_REGION}'
252+
- 'SKIP_BUILD=true'
253+
- 'JARS=gs://dataproc-templates_cloudbuild/integration-testing/jars/mysql-connector-java.jar'
254+
script: |
255+
#!/usr/bin/env bash
256+
cd python
257+
./bin/start.sh \
258+
-- --template=JDBCTOGCS \
259+
--jdbctogcs.input.url.secret="jdbctobqconn" \
260+
--jdbctogcs.input.driver="com.mysql.jdbc.Driver" \
261+
--jdbctogcs.input.table="test.demo" \
262+
--jdbctogcs.output.location="gs://dataproc-templates_cloudbuild/integration-testing-python/JDBCTOGCS_SECRET/output" \
263+
--jdbctogcs.output.mode="overwrite" \
264+
--jdbctogcs.output.format="csv"
265+
secretEnv: ['TEST_JDBC_URL']
266+
waitFor: ['build-and-upload']
267+
220268
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
221269
id: jdbc-to-jdbc
222270
env:
@@ -242,6 +290,30 @@ steps:
242290
secretEnv: ['TEST_JDBC_URL']
243291
waitFor: ['build-and-upload']
244292

293+
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
294+
id: jdbc-to-jdbc-with-secret
295+
env:
296+
- 'GCP_PROJECT=${_GCP_PROJECT}'
297+
- 'GCS_STAGING_LOCATION=${_GCS_STAGING_LOCATION_BASE}'
298+
- 'GCS_DEPS_BUCKET=${_GCS_DEPS_BUCKET}'
299+
- 'REGION=${_REGION}'
300+
- 'SKIP_BUILD=true'
301+
- 'JARS=gs://dataproc-templates_cloudbuild/integration-testing/jars/mysql-connector-java.jar'
302+
script: |
303+
#!/usr/bin/env bash
304+
cd python
305+
./bin/start.sh \
306+
-- --template=JDBCTOJDBC \
307+
--jdbctojdbc.input.url.secret="jdbctobqconn" \
308+
--jdbctojdbc.input.driver="com.mysql.cj.jdbc.Driver" \
309+
--jdbctojdbc.input.table="demo" \
310+
--jdbctojdbc.output.url.secret="jdbctobqconn" \
311+
--jdbctojdbc.output.driver="com.mysql.cj.jdbc.Driver" \
312+
--jdbctojdbc.output.table="demo_out" \
313+
--jdbctojdbc.output.mode="overwrite" \
314+
--jdbctojdbc.output.batch.size="1000"
315+
waitFor: ['build-and-upload']
316+
245317
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
246318
id: awss3-to-bigquery
247319
env:

0 commit comments

Comments
 (0)