1
0
mirror of synced 2026-01-04 09:04:47 -05:00
Files
airbyte/tools/ci_credentials/README.md
Ella Rohm-Ensing 9cfc647fa5 Ella/fail on extra fields (#23985)
* Pass argument along, add test that should pass and test that should fail

* Add tests with additionalProperties

* Set additionalproperties=false when not set|

* Parametrize test cases

* Make the behavior 'optional'

* Fix parametrization for all combinations

* Improve CI credentials README and rename param

* Update naming to be clearer about columns only

* record_has_unexpected_field > record_has_unexpected_column

* Automated Change

* Add bypass for beta + ga connectors that failed

* Update docs and TODOs

* Update changelog and dockerfile

* Update TODO

* Update a few neglected connectors

* Remove uploaded file

* Update dockerfile after merge conflict

---------

Co-authored-by: marcosmarxm <marcosmarxm@users.noreply.github.com>
2023-03-23 22:22:44 +00:00

2.3 KiB

CI Credentials

CLI tooling to read and manage GSM secrets:

  • write-to-storage download a connector's secrets locally in the connector's secret folder
  • update-secrets uploads new connector secret version that were locally updated.

Development

Set up the world the same way Google Actions does it in test-command.yml.

source venv/bin/activate
pip install --quiet tox==3.24.4
tox -r -c ./tools/tox_ci.ini
pip install --quiet -e ./tools/ci_*

Download a Service account json key that has access to Google Secrets Manager.

Create Service Account

Create Service Account Token

Setup ci_credentials

  • In your .zshrc, add: export GCP_GSM_CREDENTIALS=cat $(<path to JSON file>)
  • Follow README.md under tools/ci_credentials

After making a change, you have to reinstall it to run the bash command: pip install --quiet -e ./tools/ci_*

Run it

The VERSION=dev will make it so it knows to use your local current working directory and not the Github Action one.

Help

ci_credentials --help

Write credentials for a specific connector to local storage

To download GSM secrets to airbyte-integrations/connectors/source-bings-ads/secrets:

ci_credentials source-bing-ads write-to-storage

Write credentials for all connectors to local storage

To download GSM secrets to for all available connectors into their respective secrets directories:

ci_credentials all write-to-storage

Update secrets

To upload to GSM newly updated configurations from airbyte-integrations/connectors/source-bings-ads/secrets/updated_configurations:

ci_credentials source-bing-ads update-secrets