-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into gavin/phoenix-connector
- Loading branch information
Showing
31 changed files
with
1,144 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Build and Release Database Connector | ||
|
||
on: | ||
push: | ||
branches: | ||
- "snowflake/*" | ||
- "mysql/*" | ||
- "oracle/*" | ||
|
||
jobs: | ||
docker-build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
database: [snowflake, mysql, oracle] | ||
|
||
outputs: | ||
release_tag: ${{ steps.extract_tag.outputs.tag }} | ||
|
||
permissions: | ||
contents: read | ||
packages: write # Allows pushing to GHCR | ||
id-token: write # Required for authenticating with GHCR | ||
|
||
steps: | ||
- name: Checkout repository | ||
if: contains(github.ref, matrix.database) | ||
uses: actions/checkout@v3 | ||
|
||
- name: Extract version from branch name | ||
if: contains(github.ref, matrix.database) | ||
id: extract_tag | ||
run: | | ||
# Get the database type from the matrix | ||
DB_TYPE=${{ matrix.database }} | ||
# Use sed to remove the database prefix and get only the version part | ||
VERSION=$(echo "${GITHUB_REF#refs/heads/}" | sed "s|^${DB_TYPE}/||") | ||
# Construct the Docker tag | ||
echo "docker_tag=ghcr.io/hasura/ndc-jvm-${DB_TYPE}:${VERSION}" >> $GITHUB_OUTPUT | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
if: contains(github.ref, matrix.database) | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Cross-platform Docker build and push | ||
if: contains(github.ref, matrix.database) | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ndc-connector-${{ matrix.database }}.dockerfile | ||
push: true | ||
tags: ${{ steps.extract_tag.outputs.docker_tag }} | ||
platforms: linux/amd64,linux/arm64 | ||
build-args: | | ||
JOOQ_PRO_EMAIL=${{ secrets.JOOQ_PRO_EMAIL }} | ||
JOOQ_PRO_LICENSE=${{ secrets.JOOQ_PRO_LICENSE }} | ||
create-release: | ||
needs: docker-build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
database: [snowflake, mysql, oracle] | ||
|
||
steps: | ||
- name: Checkout repository | ||
if: contains(github.ref, matrix.database) | ||
uses: actions/checkout@v3 | ||
|
||
- name: Update dockerImage in connector-metadata.yaml | ||
if: contains(github.ref, matrix.database) | ||
run: | | ||
# Use the full Docker tag from the docker-build job output | ||
sed -i "s|^ dockerImage:.*| dockerImage: \"${{ needs.docker-build.outputs.docker_tag }}\"|" ndc-connector-${{ matrix.database }}/.hasura-connector/connector-metadata.yaml | ||
- name: Compress Hasura Connector Metadata | ||
if: contains(github.ref, matrix.database) | ||
run: | | ||
cd ndc-connector-${{ matrix.database }} | ||
tar -czf package.tar.gz ./.hasura-connector | ||
- name: Upload package.tar.gz to GitHub Release | ||
if: contains(github.ref, matrix.database) | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
tag_name: ${{ needs.docker-build.outputs.tag }} # Use the correct tag output | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ndc-connector-${{ matrix.database }}/package.tar.gz | ||
asset_name: package-${{ matrix.database }}.tar.gz | ||
asset_content_type: application/gzip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version=0.1.0 | ||
version=1.0.1 | ||
|
||
#Gradle properties | ||
quarkusPluginId=io.quarkus | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
ndc-app/src/main/kotlin/io/hasura/ndc/app/services/ConnectorConfigurationLoader.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.