I'd like to use pnpm in my CI cloudbuild pipeline. But, does that mean that i have to install it in every step? Since steps in cloudbuild are indepedent from each other. What are the alternatives?
steps:
- id: 'Node packages installing'
name: ${_NODE_VERSION}
entrypoint: 'bash'
args:
- "-c"
- |
npm install -g ${_PNPM_VERSION}
pnpm install
- name: ${_NODE_VERSION}
entrypoint: 'bash'
args:
- "-c"
- |
npm install -g ${_PNPM_VERSION}
pnpm run test
I'd like to use pnpm in my CI cloudbuild pipeline. But, does that mean that i have to install it in every step? Since steps in cloudbuild are indepedent from each other. What are the alternatives?
steps:
- id: 'Node packages installing'
name: ${_NODE_VERSION}
entrypoint: 'bash'
args:
- "-c"
- |
npm install -g ${_PNPM_VERSION}
pnpm install
- name: ${_NODE_VERSION}
entrypoint: 'bash'
args:
- "-c"
- |
npm install -g ${_PNPM_VERSION}
pnpm run test
Share
Improve this question
asked Feb 7 at 19:55
LEVI JOEL CASTILLON URQUIZALEVI JOEL CASTILLON URQUIZA
112 bronze badges
New contributor
LEVI JOEL CASTILLON URQUIZA is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1 Answer
Reset to default 0I'd say that you need to persist the package (i.e. pnpm) as volumes, but you need to validate where is pnpm installed within the filesystem of the running pipeline on Cloud Build.
PD: I'm supposing you are installing globally pnpm.