Skip to content

Commit eca05e1

Browse files
committed
corrigiendo Jenkinsfile
1 parent 95bb514 commit eca05e1

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

Jenkinsfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ pipeline {
22
agent any
33

44
environment {
5-
NODE_VERSION = '18'
6-
TEST_ENV = 'QA'
7-
PLAYWRIGHT_BROWSERS_PATH = "${WORKSPACE}\\ms-playwright"
5+
NODE_VERSION = '18'
6+
TEST_ENV = 'QA'
7+
PLAYWRIGHT_BROWSERS_PATH = "${WORKSPACE}\\ms-playwright"
8+
NPM_CONFIG_PREFIX = "${WORKSPACE}\\.npm-global"
9+
PATH = "${WORKSPACE}\\.npm-global\\bin;${env.PATH}"
810
}
911

1012
parameters {
@@ -35,6 +37,14 @@ pipeline {
3537
githubPush()
3638
}
3739

40+
stage('📦 Prepare NPM') {
41+
steps {
42+
bat '''
43+
if not exist "%WORKSPACE%\\.npm-global" mkdir "%WORKSPACE%\\.npm-global"
44+
'''
45+
}
46+
}
47+
3848
stages {
3949
stage('🔍 Checkout') {
4050
steps {
@@ -59,7 +69,7 @@ pipeline {
5969
echo '=== Instalando navegadores de Playwright ==='
6070
bat '''
6171
set PLAYWRIGHT_BROWSERS_PATH=%WORKSPACE%\\ms-playwright
62-
npx playwright install
72+
npx --prefix %WORKSPACE%\\.npm-global playwright install
6373
'''
6474
}
6575
}

0 commit comments

Comments
 (0)