Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ jobs:
platform:
- lambda
- netlify-cli
- netlify-ci
- netlify-github
- gcp-functions
- firebase-functions
- azure-functions-linux
Expand Down
2 changes: 1 addition & 1 deletion platforms-serverless/netlify-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Netlify CLI
# Netlify via CLI

Prisma and Netlify (deploy via netlify CLI) integration.

Expand Down
2 changes: 1 addition & 1 deletion platforms-serverless/netlify-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "netlify",
"name": "netlify-cli",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion platforms-serverless/netlify-cli/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ datasource db {
generator client {
provider = "prisma-client-js"
binaryTargets = ["rhel-openssl-1.0.x"]
output = "../functions/generated/client"
output = "../functions/generated/client" // Why does this need/use a custom output?
}

model User {
Expand Down
2 changes: 1 addition & 1 deletion platforms-serverless/netlify-cli/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mv index.zip ../functions-build/index.zip
cd ..

# deploy content of `functions-build` to Netlify
yarn netlify deploy --dir=. --prod --functions=functions-build
yarn netlify deploy --dir=. --functions=functions-build
# TODO Use individual deployment URL and store

# TODO Why is this done?
Expand Down
2 changes: 1 addition & 1 deletion platforms-serverless/netlify-cli/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ else
fi

# TODO Use individual deployment URL
npx ts-node ../../utils/fetch-retry-and-confirm-version.ts --url https://prisma2-e2e-tests-netlify-cli.netlify.app/.netlify/functions/index --prisma-version $(sh ../../utils/prisma_version.sh) --binary-string $BINARY_STRING
npx ts-node ../../utils/fetch-retry-and-confirm-version.ts --url https://prisma-ecosystem-tests-netlify-cli.netlify.app/.netlify/functions/index --prisma-version $(sh ../../utils/prisma_version.sh) --binary-string $BINARY_STRING
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Netlify CI
# Netlify via GitHub

Prisma and Netlify integration via Git (via another separate Git repository that is pushed to during deployment)
Prisma and Netlify integration via GitHub (via another separate Git repository that is pushed to during deployment)

## How to run this locally

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "netlify-ci-to-be-replace-on-build",
"name": "netlify-github-to-be-replaced-on-build",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
Expand All @@ -10,7 +10,7 @@
},
"scripts": {
"dev": "npx netlify dev",
"build": "PRISMA_TELEMETRY_INFORMATION='ecosystem-tests platform netlify-ci build' && yarn prisma generate"
"build": "PRISMA_TELEMETRY_INFORMATION='ecosystem-tests platform netlify-github build' && yarn prisma generate"
},
"dependencies": {
"@prisma/client": "4.12.0-dev.34"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ fi


# Modify package.json to bust cache
sed -i "s/netlify-ci-to-be-replace-on-build/$(date +%s%N)/" package.json
# TODO Is this still needed?
sed -i "s/netlify-github-to-be-replaced-on-build/$(date +%s%N)/" package.json

# Set up project
rm -rf node_modules/
Expand All @@ -36,7 +37,7 @@ git config --global user.name "Prismo"

# push project to Netlify
git init
git remote add origin "git@github.com:prisma/prisma2-e2e-tests-netlify.git"
git remote add origin "git@github.com:prisma/prisma-ecosystem-tests-netlify-github.git"
git add .
git commit -m "push to netlify: $ID, engine = $PRISMA_CLIENT_ENGINE_TYPE"
# TODO Do not force push so history is available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ else
files=',"files":["deno","edge.d.ts","edge.js","index-browser.js","index.d.ts","index.js","libquery_engine-rhel-openssl-1.0.x.so.node","package.json","schema.prisma"]'
fi

npx ts-node ../../utils/fetch-retry-and-confirm-version.ts --url https://$ID--prisma2-e2e-tests-netlify-ci.netlify.app/.netlify/functions/index --prisma-version $(sh ../../utils/prisma_version.sh) --binary-string $files
npx ts-node ../../utils/fetch-retry-and-confirm-version.ts --url https://$ID--prisma-ecosystem-tests-netlify-github.netlify.app/.netlify/functions/index --prisma-version $(sh ../../utils/prisma_version.sh) --binary-string $files