feat: Jenkinsfile node_Modules verzeichnis in Docker Volume gespeichert

This commit is contained in:
ISA
2025-08-28 15:36:32 +02:00
parent 9649eec907
commit b011ab9862
6 changed files with 17 additions and 13 deletions

15
Jenkinsfile vendored
View File

@@ -1,20 +1,19 @@
pipeline {
agent any
environment {
NODE_PATH = '/var/jenkins_home/.npm/node_modules'
NPM_CONFIG_CACHE = '/var/jenkins_home/.npm'
}
stages {
stage('Install dependencies') {
steps {
sh 'npm ci'
}
}
stage('Start Webserver') {
steps {
sh 'nohup npm run dev &'
sleep(time: 20, unit: 'SECONDS') // Wartezeit für Server-Start
sh 'npm install --prefer-offline --no-audit'
}
}
stage('Run Playwright tests') {
steps {
sh 'npx playwright install'
sh 'npx playwright test'
}
}