Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/ship.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,20 +292,10 @@ jobs:
path: ndc-hub
token: ${{ secrets.HASURA_BOT_TOKEN }}

- name: check out cli-plugins-index
uses: actions/checkout@v4
with:
repository: hasura/cli-plugins-index
path: cli-plugins-index
token: ${{ secrets.HASURA_BOT_TOKEN }}

- uses: actions/download-artifact@v4
with:
path: release/artifacts
merge-multiple: true

- name: create cli-plugins-index PR
run: ./ndc-postgres/ci/create-cli-plugins-index-pr.sh "${GITHUB_REF_NAME}" ndc-postgres cli-plugins-index

- name: create ndc-hub PR
run: ./ndc-postgres/ci/create-hub-release-pr.sh "${GITHUB_REF_NAME}" "ndc-postgres" "ndc-hub"
7 changes: 6 additions & 1 deletion ci/connector-package-definition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ chmod +x ./${RELEASE_DIR}/artifacts/ndc-postgres-cli-*

# export env vars for templating
export RELEASE_VERSION="$RELEASE_VERSION"
export LINUX_AMD64_SHA256=$(sha256sum ${RELEASE_DIR}/artifacts/ndc-postgres-cli-x86_64-unknown-linux-gnu | cut -f1 -d' ')
export MACOS_AMD64_SHA256=$(sha256sum ${RELEASE_DIR}/artifacts/ndc-postgres-cli-x86_64-apple-darwin | cut -f1 -d' ')
export WINDOWS_AMD64_SHA256=$(sha256sum ${RELEASE_DIR}/artifacts/ndc-postgres-cli-x86_64-pc-windows-msvc.exe | cut -f1 -d' ')
export LINUX_ARM64_SHA256=$(sha256sum ${RELEASE_DIR}/artifacts/ndc-postgres-cli-aarch64-unknown-linux-gnu | cut -f1 -d' ')
export MACOS_ARM64_SHA256=$(sha256sum ${RELEASE_DIR}/artifacts/ndc-postgres-cli-aarch64-apple-darwin | cut -f1 -d' ')

# add the connector metadata from template
mkdir -p ${RELEASE_DIR}/package/.hasura-connector
# Use a limited set of variables to substitute with envsubst
envsubst '${RELEASE_VERSION}' < ci/templates/connector-metadata.yaml > ${RELEASE_DIR}/package/.hasura-connector/connector-metadata.yaml
envsubst '${RELEASE_VERSION}${LINUX_AMD64_SHA256}${MACOS_AMD64_SHA256}${WINDOWS_AMD64_SHA256}${LINUX_ARM64_SHA256}${MACOS_ARM64_SHA256}' < ci/templates/connector-metadata.yaml > ${RELEASE_DIR}/package/.hasura-connector/connector-metadata.yaml

# create a tarball of the package definition
tar vczf ${RELEASE_DIR}/artifacts/package.tar.gz -C ${RELEASE_DIR}/package .
59 changes: 0 additions & 59 deletions ci/create-cli-plugins-index-pr.sh

This file was deleted.

2 changes: 1 addition & 1 deletion ci/create-hub-release-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BRANCH_NAME="ndc-postgres/release-$RELEASE_VERSION"
# These exported env vars are used for templating
export RELEASE_VERSION="${RELEASE_VERSION}"
export RELEASE_HASH="$(cd $NDC_POSTGRES_DIR && git rev-parse HEAD)"
export CONNECTOR_DEFINITION_HASH=$(sha256sum ${ROOT}/release/artifacts/connector-definition.tgz | cut -f1 -d' ')
export CONNECTOR_DEFINITION_HASH=$(sha256sum ${ROOT}/release/artifacts/package.tar.gz | cut -f1 -d' ')

# Change working directory to the target folder
cd $NDC_HUB_DIR
Expand Down
25 changes: 22 additions & 3 deletions ci/templates/connector-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,28 @@ supportedEnvironmentVariables:
commands:
update: hasura-ndc-postgres update
cliPlugin:
type: Binary
name: ndc-postgres
version: ${RELEASE_VERSION}
type: BinaryInline
platforms:
- selector: darwin-arm64
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-aarch64-apple-darwin"
sha256: "${MACOS_ARM64_SHA256}"
bin: "hasura-ndc-postgres"
- selector: linux-arm64
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-aarch64-unknown-linux-gnu"
sha256: "${LINUX_ARM64_SHA256}"
bin: "hasura-ndc-postgres"
- selector: darwin-amd64
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-x86_64-apple-darwin"
sha256: "${MACOS_AMD64_SHA256}"
bin: "hasura-ndc-postgres"
- selector: windows-amd64
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-x86_64-pc-windows-msvc.exe"
sha256: "${WINDOWS_AMD64_SHA256}"
bin: "hasura-ndc-postgres.exe"
- selector: linux-amd64
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-x86_64-unknown-linux-gnu"
sha256: "${LINUX_AMD64_SHA256}"
bin: "hasura-ndc-postgres"
dockerComposeWatch:
- path: ./
target: /etc/connector
Expand Down
40 changes: 0 additions & 40 deletions ci/templates/manifest.yaml

This file was deleted.

Loading