feat(deps): enable Yarn and pnpm as dependency managers in the pipeline
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
300dad5010
commit
67d2fd22ea
@ -106,6 +106,9 @@ class DependenciesResolver {
|
|||||||
|
|
||||||
this.getNodeVersion()
|
this.getNodeVersion()
|
||||||
|
|
||||||
|
steps.log.info("Dependencies Resolver","Using YARN as dependencies manager, enable Yarn with corepack...")
|
||||||
|
steps.sh "corepack enable yarn && yarn -v"
|
||||||
|
|
||||||
if (cachingEnabled) {
|
if (cachingEnabled) {
|
||||||
steps.dir(this.workspace) {
|
steps.dir(this.workspace) {
|
||||||
steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: ".${configurations.name}-yarn-cache", cacheValidityDecidingFile: 'yarn.lock']]) {
|
steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: ".${configurations.name}-yarn-cache", cacheValidityDecidingFile: 'yarn.lock']]) {
|
||||||
@ -129,6 +132,9 @@ class DependenciesResolver {
|
|||||||
|
|
||||||
this.getNodeVersion()
|
this.getNodeVersion()
|
||||||
|
|
||||||
|
steps.log.info("Dependencies Resolver","Using pnpm as dependencies manager, enable pnpm with corepack...")
|
||||||
|
steps.sh "corepack enable pnpm && pnpm -v"
|
||||||
|
|
||||||
if (cachingEnabled) {
|
if (cachingEnabled) {
|
||||||
steps.dir(this.workspace) {
|
steps.dir(this.workspace) {
|
||||||
steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: ".${configurations.name}-pnpm-cache", cacheValidityDecidingFile: 'pnpm-lock.yaml']]) {
|
steps.cache(maxCacheSize: 512, caches: [[$class: 'ArbitraryFileCache', includes: '**/*', path: ".${configurations.name}-pnpm-cache", cacheValidityDecidingFile: 'pnpm-lock.yaml']]) {
|
||||||
|
|||||||
@ -57,7 +57,7 @@ executeFreeleapsPipeline {
|
|||||||
root: 'frontend',
|
root: 'frontend',
|
||||||
language: 'javascript',
|
language: 'javascript',
|
||||||
dependenciesManager: 'pnpm',
|
dependenciesManager: 'pnpm',
|
||||||
npmPackageJsonFile: 'package.json',
|
pnpmPackageJsonFile: 'package.json',
|
||||||
buildCacheEnabled: true,
|
buildCacheEnabled: true,
|
||||||
buildAgentImage: 'node:lts',
|
buildAgentImage: 'node:lts',
|
||||||
buildCommand: 'pnpm -r build',
|
buildCommand: 'pnpm -r build',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user