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:
|
||||
- name: CI
|
||||
value: "true"
|
||||
- name: COREPACK_HOME
|
||||
value: $(workspaces.source.path)/.ci/corepack
|
||||
- name: NPM_CONFIG_CACHE
|
||||
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:
|
||||
- name: install
|
||||
computeResources:
|
||||
@@ -69,7 +71,10 @@ spec:
|
||||
script: |
|
||||
#!/bin/sh
|
||||
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
|
||||
computeResources:
|
||||
requests: {cpu: 100m, memory: 256Mi}
|
||||
@@ -77,9 +82,9 @@ spec:
|
||||
script: |
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
corepack pnpm --filter api exec eslint \
|
||||
pnpm --filter api exec eslint \
|
||||
"{src,apps,libs,test}/**/*.ts" --max-warnings=0
|
||||
corepack pnpm --filter web lint
|
||||
pnpm --filter web lint
|
||||
- name: test
|
||||
computeResources:
|
||||
requests: {cpu: 100m, memory: 512Mi}
|
||||
@@ -87,8 +92,8 @@ spec:
|
||||
script: |
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
corepack pnpm --filter api test --runInBand
|
||||
corepack pnpm --filter web test
|
||||
pnpm --filter api test --runInBand
|
||||
pnpm --filter web test
|
||||
node --test scripts/deploy-cloudflare-pages.test.mjs
|
||||
- name: build
|
||||
computeResources:
|
||||
@@ -97,8 +102,8 @@ spec:
|
||||
script: |
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
corepack pnpm --filter api build
|
||||
corepack pnpm --filter web build:staging
|
||||
pnpm --filter api build
|
||||
pnpm --filter web build:staging
|
||||
- name: audit
|
||||
computeResources:
|
||||
requests: {cpu: 50m, memory: 128Mi}
|
||||
@@ -106,7 +111,7 @@ spec:
|
||||
script: |
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
corepack pnpm audit --prod --audit-level high
|
||||
pnpm audit --prod --audit-level high
|
||||
---
|
||||
apiVersion: tekton.dev/v1
|
||||
kind: Task
|
||||
@@ -235,8 +240,10 @@ spec:
|
||||
env:
|
||||
- name: CI
|
||||
value: "true"
|
||||
- name: COREPACK_HOME
|
||||
value: $(workspaces.source.path)/.ci/corepack
|
||||
- name: NPM_CONFIG_CACHE
|
||||
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
|
||||
value: lolympus
|
||||
- name: CF_PAGES_STAGING_BRANCH
|
||||
@@ -247,7 +254,12 @@ spec:
|
||||
script: |
|
||||
#!/bin/sh
|
||||
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
|
||||
kind: Task
|
||||
|
||||
Reference in new issue
Block a user