feat: Jenkinsfile node_Modules verzeichnis in Docker Volume gespeichert
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user