Skip to content

Commit e654dd3

Browse files
authored
we cannot use cli-plugins-index with v2 (#802)
We tried reverting to using cli-plugins index, which was the previous behavior, in case that fixed our CI issues. Turns out that is not allowed. This PR reverts that change.
1 parent f2c2a52 commit e654dd3

File tree

6 files changed

+29
-114
lines changed

6 files changed

+29
-114
lines changed

.github/workflows/ship.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -292,20 +292,10 @@ jobs:
292292
path: ndc-hub
293293
token: ${{ secrets.HASURA_BOT_TOKEN }}
294294

295-
- name: check out cli-plugins-index
296-
uses: actions/checkout@v4
297-
with:
298-
repository: hasura/cli-plugins-index
299-
path: cli-plugins-index
300-
token: ${{ secrets.HASURA_BOT_TOKEN }}
301-
302295
- uses: actions/download-artifact@v4
303296
with:
304297
path: release/artifacts
305298
merge-multiple: true
306299

307-
- name: create cli-plugins-index PR
308-
run: ./ndc-postgres/ci/create-cli-plugins-index-pr.sh "${GITHUB_REF_NAME}" ndc-postgres cli-plugins-index
309-
310300
- name: create ndc-hub PR
311301
run: ./ndc-postgres/ci/create-hub-release-pr.sh "${GITHUB_REF_NAME}" "ndc-postgres" "ndc-hub"

ci/connector-package-definition.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ chmod +x ./${RELEASE_DIR}/artifacts/ndc-postgres-cli-*
2424

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

2833
# add the connector metadata from template
2934
mkdir -p ${RELEASE_DIR}/package/.hasura-connector
3035
# Use a limited set of variables to substitute with envsubst
31-
envsubst '${RELEASE_VERSION}' < ci/templates/connector-metadata.yaml > ${RELEASE_DIR}/package/.hasura-connector/connector-metadata.yaml
36+
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
3237

3338
# create a tarball of the package definition
3439
tar vczf ${RELEASE_DIR}/artifacts/package.tar.gz -C ${RELEASE_DIR}/package .

ci/create-cli-plugins-index-pr.sh

Lines changed: 0 additions & 59 deletions
This file was deleted.

ci/create-hub-release-pr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ BRANCH_NAME="ndc-postgres/release-$RELEASE_VERSION"
2424
# These exported env vars are used for templating
2525
export RELEASE_VERSION="${RELEASE_VERSION}"
2626
export RELEASE_HASH="$(cd $NDC_POSTGRES_DIR && git rev-parse HEAD)"
27-
export CONNECTOR_DEFINITION_HASH=$(sha256sum ${ROOT}/release/artifacts/connector-definition.tgz | cut -f1 -d' ')
27+
export CONNECTOR_DEFINITION_HASH=$(sha256sum ${ROOT}/release/artifacts/package.tar.gz | cut -f1 -d' ')
2828

2929
# Change working directory to the target folder
3030
cd $NDC_HUB_DIR

ci/templates/connector-metadata.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,28 @@ supportedEnvironmentVariables:
1919
commands:
2020
update: hasura-ndc-postgres update
2121
cliPlugin:
22-
type: Binary
23-
name: ndc-postgres
24-
version: ${RELEASE_VERSION}
22+
type: BinaryInline
23+
platforms:
24+
- selector: darwin-arm64
25+
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-aarch64-apple-darwin"
26+
sha256: "${MACOS_ARM64_SHA256}"
27+
bin: "hasura-ndc-postgres"
28+
- selector: linux-arm64
29+
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-aarch64-unknown-linux-gnu"
30+
sha256: "${LINUX_ARM64_SHA256}"
31+
bin: "hasura-ndc-postgres"
32+
- selector: darwin-amd64
33+
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-x86_64-apple-darwin"
34+
sha256: "${MACOS_AMD64_SHA256}"
35+
bin: "hasura-ndc-postgres"
36+
- selector: windows-amd64
37+
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-x86_64-pc-windows-msvc.exe"
38+
sha256: "${WINDOWS_AMD64_SHA256}"
39+
bin: "hasura-ndc-postgres.exe"
40+
- selector: linux-amd64
41+
uri: "https://github.com/hasura/ndc-postgres/releases/download/${RELEASE_VERSION}/ndc-postgres-cli-x86_64-unknown-linux-gnu"
42+
sha256: "${LINUX_AMD64_SHA256}"
43+
bin: "hasura-ndc-postgres"
2544
dockerComposeWatch:
2645
- path: ./
2746
target: /etc/connector

ci/templates/manifest.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)