From 6ab45ba26952d8b04f4b5ce6199d020180c4ecc4 Mon Sep 17 00:00:00 2001 From: John Smith Date: Thu, 5 Dec 2024 08:50:24 +1030 Subject: [PATCH] ci: Add data-connector build step --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ data-connector/README.md | 2 ++ 2 files changed, 33 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6773a5e..0ec7052c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,7 @@ jobs: sdk_react: ${{ steps.filter.outputs.sdk_react }} cli: ${{ steps.filter.outputs.cli }} control_plane: ${{ steps.filter.outputs.control_plane }} + data_connector: ${{ steps.filter.outputs.data_connector }} app: ${{ steps.filter.outputs.app }} # Deploy steps (Docker build / CFN) if either control-plane or app changed deploy: ${{ steps.filter.outputs.deploy }} @@ -547,6 +548,36 @@ jobs: docker push $DOCKERHUB_USERNAME/control-plane:$IMAGE_TAG docker push $DOCKERHUB_USERNAME/control-plane:latest + build-data-connector-image: + runs-on: ubuntu-latest + needs: check_changes + if: ${{ needs.check_changes.outputs.data_connector == 'true' && github.ref == 'refs/heads/main' }} + permissions: + id-token: write + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build Control Plane Docker Image + env: + IMAGE_TAG: ${{ github.sha }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + run: | + docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD + cd data-connector + VERSION=${{ github.sha }} + SHORT_VERSION=$(echo ${{ github.sha }} | cut -c 1-6) + docker buildx build \ + --target run \ + --push \ + --build-arg="VERSION=$VERSION" \ + --build-arg="SHORT_VERSION=$SHORT_VERSION" \ + -t $DOCKERHUB_USERNAME/data-connector:$IMAGE_TAG -t $DOCKERHUB_USERNAME/$data-connector:latest ./ + deploy-cloud: runs-on: ubuntu-latest if: ${{ needs.check_changes.outputs.deploy == 'true' && github.ref == 'refs/heads/main' }} diff --git a/data-connector/README.md b/data-connector/README.md index 95aed39e..bbc9fdfb 100644 --- a/data-connector/README.md +++ b/data-connector/README.md @@ -143,6 +143,8 @@ Each connector is defined in the `config.connectors` array. - `config.connectors[].type`: The type of connector. Currently only `postgres` is supported. - `config.connectors[].name`: The name of the connector. This is the Inferable service name. One will be generated if not provided. +- `config.connectors[].privacyMode`: The privacy mode. Set to `1` to enable `privacyMode` (Overrides the value at `config.privacyMode`) +- `config.connectors[].paranoidMode`: The paranoid mode. Set to `1` to enable `paranoidMode` (Overrides the value at `config.paranoidMode`)
Postgres Connector Configuration