fix: bootstrap pnpm for Node 26 tasks
This commit is contained in:
1 parent
47b4440245
commit
52233a7a78
1 file changed
+25
-13
@@ -59,8 +59,10 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: CI
|
- name: CI
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: COREPACK_HOME
|
- name: NPM_CONFIG_CACHE
|
||||||
value: $(workspaces.source.path)/.ci/corepack
|
value: $(workspaces.source.path)/.ci/npm-cache
|
||||||
|
- name: PATH
|
||||||
|
value: $(workspaces.source.path)/.ci/pnpm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
steps:
|
steps:
|
||||||
- name: install
|
- name: install
|
||||||
computeResources:
|
computeResources:
|
||||||
@@ -69,7 +71,10 @@ spec:
|
|||||||
script: |
|
script: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
corepack pnpm install --frozen-lockfile
|
mkdir -p .ci/pnpm .ci/npm-cache
|
||||||
|
npm install --global \
|
||||||
|
--prefix "$(workspaces.source.path)/.ci/pnpm" pnpm@10.4.1
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
- name: lint
|
- name: lint
|
||||||
computeResources:
|
computeResources:
|
||||||
requests: {cpu: 100m, memory: 256Mi}
|
requests: {cpu: 100m, memory: 256Mi}
|
||||||
@@ -77,9 +82,9 @@ spec:
|
|||||||
script: |
|
script: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
corepack pnpm --filter api exec eslint \
|
pnpm --filter api exec eslint \
|
||||||
"{src,apps,libs,test}/**/*.ts" --max-warnings=0
|
"{src,apps,libs,test}/**/*.ts" --max-warnings=0
|
||||||
corepack pnpm --filter web lint
|
pnpm --filter web lint
|
||||||
- name: test
|
- name: test
|
||||||
computeResources:
|
computeResources:
|
||||||
requests: {cpu: 100m, memory: 512Mi}
|
requests: {cpu: 100m, memory: 512Mi}
|
||||||
@@ -87,8 +92,8 @@ spec:
|
|||||||
script: |
|
script: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
corepack pnpm --filter api test --runInBand
|
pnpm --filter api test --runInBand
|
||||||
corepack pnpm --filter web test
|
pnpm --filter web test
|
||||||
node --test scripts/deploy-cloudflare-pages.test.mjs
|
node --test scripts/deploy-cloudflare-pages.test.mjs
|
||||||
- name: build
|
- name: build
|
||||||
computeResources:
|
computeResources:
|
||||||
@@ -97,8 +102,8 @@ spec:
|
|||||||
script: |
|
script: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
corepack pnpm --filter api build
|
pnpm --filter api build
|
||||||
corepack pnpm --filter web build:staging
|
pnpm --filter web build:staging
|
||||||
- name: audit
|
- name: audit
|
||||||
computeResources:
|
computeResources:
|
||||||
requests: {cpu: 50m, memory: 128Mi}
|
requests: {cpu: 50m, memory: 128Mi}
|
||||||
@@ -106,7 +111,7 @@ spec:
|
|||||||
script: |
|
script: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
corepack pnpm audit --prod --audit-level high
|
pnpm audit --prod --audit-level high
|
||||||
---
|
---
|
||||||
apiVersion: tekton.dev/v1
|
apiVersion: tekton.dev/v1
|
||||||
kind: Task
|
kind: Task
|
||||||
@@ -235,8 +240,10 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: CI
|
- name: CI
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: COREPACK_HOME
|
- name: NPM_CONFIG_CACHE
|
||||||
value: $(workspaces.source.path)/.ci/corepack
|
value: $(workspaces.source.path)/.ci/npm-cache
|
||||||
|
- name: PATH
|
||||||
|
value: $(workspaces.source.path)/.ci/pnpm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
- name: CF_PAGES_PROJECT_NAME
|
- name: CF_PAGES_PROJECT_NAME
|
||||||
value: lolympus
|
value: lolympus
|
||||||
- name: CF_PAGES_STAGING_BRANCH
|
- name: CF_PAGES_STAGING_BRANCH
|
||||||
@@ -247,7 +254,12 @@ spec:
|
|||||||
script: |
|
script: |
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
corepack pnpm deploy:web:staging
|
if ! command -v pnpm >/dev/null 2>&1; then
|
||||||
|
mkdir -p .ci/pnpm .ci/npm-cache
|
||||||
|
npm install --global \
|
||||||
|
--prefix "$(workspaces.source.path)/.ci/pnpm" pnpm@10.4.1
|
||||||
|
fi
|
||||||
|
pnpm deploy:web:staging
|
||||||
---
|
---
|
||||||
apiVersion: tekton.dev/v1
|
apiVersion: tekton.dev/v1
|
||||||
kind: Task
|
kind: Task
|
||||||
|
|||||||
Reference in new issue
Block a user