Skip to content

Commit 8b2ad66

Browse files
priyabhatnagar25neerajsinghal05
authored andcommitted
bqmt secret updated
1 parent eae8cda commit 8b2ad66

File tree

2 files changed

+49
-16
lines changed

2 files changed

+49
-16
lines changed

.github/workflows/e2e.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright © 2021 Cask Data, Inc.
1+
# Copyright © 2021-2023 Cask Data, Inc.
22
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
33
# use this file except in compliance with the License. You may obtain a copy of
44
# the License at
@@ -12,6 +12,7 @@
1212
# This workflow will build a Java project with Maven
1313
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
1414
# Note: Any changes to this workflow would be used only after merging into develop
15+
1516
name: Build e2e tests
1617

1718
on:
@@ -40,7 +41,8 @@ jobs:
4041
)
4142
strategy:
4243
matrix:
43-
tests: [bigquery, common, gcs, pubsub, spanner, gcscreate, gcsdelete, gcsmove, bigqueryexecute, gcscopy]
44+
tests: [bigquery, common, gcs, pubsub, spanner, gcscreate, gcsdelete, gcsmove, bigqueryexecute,
45+
bigquerymultitable]
4446
fail-fast: false
4547
steps:
4648
# Pinned 1.0.0 version
@@ -68,24 +70,52 @@ jobs:
6870
key: ${{ runner.os }}-maven-${{ github.workflow }}-${{ hashFiles('**/pom.xml') }}
6971
restore-keys: |
7072
${{ runner.os }}-maven-${{ github.workflow }}
73+
74+
- name: Get Secrets from GCP Secret Manager
75+
id: secrets
76+
uses: 'google-github-actions/get-secretmanager-secrets@v0'
77+
with:
78+
secrets: |-
79+
MYSQL_HOST:cdapio-github-builds/MYSQL_HOST
80+
MYSQL_USERNAME:cdapio-github-builds/MYSQL_USERNAME
81+
MYSQL_PASSWORD:cdapio-github-builds/MYSQL_PASSWORD
82+
MYSQL_PORT:cdapio-github-builds/MYSQL_PORT
83+
BQMT_CONNECTION_STRING:cdapio-github-builds/CONNECTION_STRING
84+
7185
- name: Run required e2e tests
7286
if: github.event_name != 'workflow_dispatch' && github.event_name != 'push' && steps.filter.outputs.e2e-test == 'false'
7387
run: python3 e2e/src/main/scripts/run_e2e_test.py --testRunner **/${{ matrix.tests }}/**/TestRunnerRequired.java
88+
env:
89+
MYSQL_HOST: ${{ steps.secrets.outputs.MYSQL_HOST }}
90+
MYSQL_USERNAME: ${{ steps.secrets.outputs.MYSQL_USERNAME }}
91+
MYSQL_PASSWORD: ${{ steps.secrets.outputs.MYSQL_PASSWORD }}
92+
MYSQL_PORT: ${{ steps.secrets.outputs.MYSQL_PORT }}
93+
BQMT_CONNECTION_STRING: ${{ steps.secrets.outputs.CONNECTION_STRING }}
94+
7495
- name: Run all e2e tests
7596
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || steps.filter.outputs.e2e-test == 'true'
7697
run: python3 e2e/src/main/scripts/run_e2e_test.py --testRunner **/${{ matrix.tests }}/**/TestRunner.java
98+
env:
99+
MYSQL_HOST: ${{ steps.secrets.outputs.MYSQL_HOST }}
100+
MYSQL_USERNAME: ${{ steps.secrets.outputs.MYSQL_USERNAME }}
101+
MYSQL_PASSWORD: ${{ steps.secrets.outputs.MYSQL_PASSWORD }}
102+
MYSQL_PORT: ${{ steps.secrets.outputs.MYSQL_PORT }}
103+
BQMT_CONNECTION_STRING: ${{ steps.secrets.outputs.CONNECTION_STRING }}
104+
77105
- name: Upload report
78106
uses: actions/upload-artifact@v3
79107
if: always()
80108
with:
81109
name: Cucumber report - ${{ matrix.tests }}
82110
path: ./plugin/target/cucumber-reports
111+
83112
- name: Upload debug files
84113
uses: actions/upload-artifact@v3
85114
if: always()
86115
with:
87116
name: Debug files - ${{ matrix.tests }}
88117
path: ./**/target/e2e-debug
118+
89119
- name: Upload files to GCS
90120
uses: google-github-actions/upload-cloud-storage@v0
91121
if: always()

src/e2e-test/resources/pluginParameters.properties

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,22 @@ bqInvalidRefName=invalidRef&^*&&*
205205
bqDatatypeChange1=[{"key":"Id","value":"long"},{"key":"Value","value":"long"}]
206206
bqDataTypeTestFileSchema1=[{"key":"Id","value":"long"},{"key":"Value","value":"long"},\
207207
{"key":"UID","value":"string"}]
208-
bqExpectedFile=testdata/BigQuery/BQExistingTableFile
209-
bgInsertDatatypeFile=testdata/BigQuery/BQInsertDatatypeFile
208+
##BQMT
209+
databaseName=cdfmysqldb
210+
host=MYSQL_HOST
211+
user=MYSQL_USERNAME
212+
pass=MYSQL_PASSWORD
213+
port=MYSQL_PORT
214+
connectionString=BQMT_CONNECTION_STRING
215+
mySQLSourceTable=dummy
216+
sourceTable=dummy
217+
tableNameField=tableName
218+
jdbcPluginName=mysql
219+
bqmtSplitField1=tablename
220+
bqmtInvalidChunkSize=26214
221+
bqmtInvalidSinkDataset=$#%$
222+
bqmtInvalidSinkReferenceName=(*^*&*
223+
bqmtInvalidTemporaryBucket=$#%$
210224
## BIGQUERY-PLUGIN-PROPERTIES-END
211225

212226
## PUBSUBSINK-PLUGIN-PROPERTIES-START
@@ -267,24 +281,13 @@ spannerSourceBasicSchema=[{"key":"EmployeeDepartment","value":"string"},{"key":"
267281
## GCSMove-PLUGIN-PROPERTIES-START
268282
gcsMoveMandatoryProperties=sourcePath,destPath
269283
gcsMoveValidGcsPath=gs://valid-bucket-format
270-
gcsMoveReadRecursivePath=testdata/
284+
gcsMoveReadRecursivePath=testdata
271285
gcsMoveReadRecursiveSubDirectory=testdata/GCS_RECURSIVE_TEST
272286
locationEU=eu
273287
gcsDoneSuccessFile=__SUCCESS
274288
gcsDoneFailedFile=__FAILED
275289
## GCSMove-PLUGIN-PROPERTIES-END
276290

277-
## GCSCopy-PLUGIN-PROPERTIES-START
278-
gcsCopyMandatoryProperties=sourcePath,destPath
279-
invalidsourcePath=abc@
280-
invaliddestPath=abc@
281-
invalidEncryptionKey=abc@
282-
gcsCopyReadRecursivePath=testdata/
283-
gcsCopyReadRecursiveSubDirectory=testdata/GCS_RECURSIVE_TEST
284-
gcsCopyCsvExpectedFilePath=src/e2e-test/resources/testdata/GCSCOPY_CSV_TEST.csv
285-
gcsCopyRecursivePath=src/e2e-test/resources/testdata/GCS_RECURSIVE_TEST
286-
## GCSCopy-PLUGIN-PROPERTIES-END
287-
288291
## BQEXECUTE-PLUGIN-PROPERTIES-START
289292
bqExecuteQuery=SELECT * FROM `PROJECT_NAME.DATASET.TABLENAME`
290293
bqExecuteRowAsArgQuery=SELECT DISTINCT ProjectId as bqExecuteArgProjectID, Dataset as bqExecuteArgDataset FROM `PROJECT_NAME.DATASET.TABLENAME` limit 1

0 commit comments

Comments
 (0)