Skip to content

Commit

Permalink
ci: Add data-connector build step (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith authored Dec 4, 2024
1 parent 4f01bb3 commit 0352e2a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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' }}
Expand Down
2 changes: 2 additions & 0 deletions data-connector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

<details>
<summary>Postgres Connector Configuration</summary>
Expand Down

0 comments on commit 0352e2a

Please sign in to comment.