Test: Jenkinsfile

This commit is contained in:
Ismail Ali
2025-08-31 16:04:35 +02:00
parent 9db92a2728
commit e732971cdc
6 changed files with 28 additions and 23 deletions

34
Jenkinsfile vendored
View File

@@ -1,21 +1,19 @@
pipeline {
agent any
environment {
NODE_PATH = '/var/jenkins_home/.npm/node_modules'
NPM_CONFIG_CACHE = '/var/jenkins_home/.npm'
agent any
tools { nodejs 'node20' }
stages {
stage('Checkout') {
steps { checkout scm }
}
stages {
stage('Install dependencies') {
steps {
sh 'npm install --prefer-offline --no-audit'
}
}
stage('Run Playwright tests') {
steps {
sh 'npx playwright test'
}
}
stage('Install dependencies') {
steps { sh 'npm ci' }
}
}
stage('Playwright tests') {
steps {
// Installiert Browser & Systemdeps falls nötig
sh 'npx playwright install --with-deps'
sh 'npx playwright test'
}
}
}
}