fix. Jenkinsfile
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.860
|
NEXT_PUBLIC_APP_VERSION=1.6.861
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.860
|
NEXT_PUBLIC_APP_VERSION=1.6.861
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
## [1.6.861] – 2025-09-08
|
||||||
|
|
||||||
|
- test: Jenkinsfile
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.860] – 2025-09-08
|
## [1.6.860] – 2025-09-08
|
||||||
|
|
||||||
- fix: Jenkinsfile
|
- fix: Jenkinsfile
|
||||||
|
|||||||
54
Jenkinsfile
vendored
54
Jenkinsfile
vendored
@@ -1,13 +1,7 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
//test 1
|
// Fallback Variante ohne Docker-Plugin (agent any)
|
||||||
// Nutze das gleiche Playwright-Image wie Woodpecker für Parität
|
agent any
|
||||||
agent {
|
tools { nodejs 'node20' }
|
||||||
docker {
|
|
||||||
image 'mcr.microsoft.com/playwright:v1.54.2-jammy'
|
|
||||||
// root erlaubt playwright install (falls nötig)
|
|
||||||
args '-u 0:0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
options { timestamps() }
|
options { timestamps() }
|
||||||
|
|
||||||
@@ -24,30 +18,32 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Self-check Jenkinsfile version') {
|
stage('Self-check Jenkinsfile version') {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''
|
||||||
set -euo pipefail
|
set -eu
|
||||||
echo '==== Showing first lines of Jenkinsfile (debug) ===='
|
echo '==== Showing first lines of Jenkinsfile (debug) ===='
|
||||||
head -n 40 Jenkinsfile || true
|
head -n 40 Jenkinsfile || true
|
||||||
echo 'Git commit:'
|
echo 'Git commit:'
|
||||||
git rev-parse --short HEAD || true
|
git rev-parse --short HEAD || true
|
||||||
'''
|
uname -a || true
|
||||||
|
which node || true
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Versions') {
|
stage('Versions') {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''
|
||||||
set -euo pipefail
|
set -eu
|
||||||
node -v && npm -v
|
node -v && npm -v
|
||||||
npx playwright --version || true
|
npx playwright --version || true
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Verify mocks') {
|
stage('Verify mocks') {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''
|
||||||
set -euo pipefail
|
set -eu
|
||||||
echo "[Verify mocks] working dir: $(pwd)"
|
echo "[Verify mocks] working dir: $(pwd)"
|
||||||
node -v && npm -v
|
node -v && npm -v
|
||||||
echo "HUSKY=$HUSKY"
|
echo "HUSKY=$HUSKY"
|
||||||
@@ -57,7 +53,7 @@ git ls-files | grep -i '^mocks/device-cgi-simulator/SERVICE/systemMockData.js' |
|
|||||||
echo "=== ls -la ==="
|
echo "=== ls -la ==="
|
||||||
ls -la mocks/device-cgi-simulator/SERVICE || true
|
ls -la mocks/device-cgi-simulator/SERVICE || true
|
||||||
echo "=== file exists? ==="
|
echo "=== file exists? ==="
|
||||||
if [[ -f mocks/device-cgi-simulator/SERVICE/systemMockData.js ]]; then
|
if [ -f mocks/device-cgi-simulator/SERVICE/systemMockData.js ]; then
|
||||||
echo 'FOUND'
|
echo 'FOUND'
|
||||||
else
|
else
|
||||||
echo 'MISSING'; exit 1
|
echo 'MISSING'; exit 1
|
||||||
@@ -68,37 +64,33 @@ fi
|
|||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''
|
||||||
set -euo pipefail
|
set -eu
|
||||||
env npm_config_production=false npm ci
|
env npm_config_production=false npm ci
|
||||||
npm run build
|
npm run build
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('E2E chromium') {
|
stage('E2E chromium') {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''
|
||||||
set -euo pipefail
|
set -eu
|
||||||
echo 'Start simulator'
|
echo 'Start simulator'
|
||||||
npm run server:sim &
|
npm run server:sim &
|
||||||
SIM_PID=$!
|
SIM_PID=$!
|
||||||
|
|
||||||
cleanup() {
|
trap 'echo Stopping simulator; kill $SIM_PID 2>/dev/null || true' EXIT
|
||||||
echo 'Stopping simulator'
|
|
||||||
kill $SIM_PID 2>/dev/null || true
|
|
||||||
}
|
|
||||||
trap cleanup EXIT
|
|
||||||
|
|
||||||
echo 'Waiting for http://localhost:3000'
|
echo 'Waiting for http://localhost:3000'
|
||||||
node -e "const http=require('http');let n=120;function ping(){http.get('http://localhost:3000',res=>{console.log('Server is up');process.exit(0)}).on('error',()=>{if(n--<=0){console.error('Server did not start');process.exit(1)}setTimeout(ping,1000)});}ping();"
|
node -e "const http=require('http');let n=120;function ping(){http.get('http://localhost:3000',res=>{console.log('Server is up');process.exit(0)}).on('error',()=>{if(n--<=0){console.error('Server did not start');process.exit(1)}setTimeout(ping,1000)});}ping();"
|
||||||
|
|
||||||
# Browser (Image hat sie normalerweise schon)
|
# Playwright Browser installieren (best-effort)
|
||||||
npx playwright install --with-deps chromium || true
|
npx playwright install chromium || true
|
||||||
|
|
||||||
echo 'Run tests (chromium)'
|
echo 'Run tests (chromium)'
|
||||||
npx playwright test --project=chromium
|
npx playwright test --project=chromium
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.860",
|
"version": "1.6.861",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.860",
|
"version": "1.6.861",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.860",
|
"version": "1.6.861",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3000",
|
"dev": "next dev -p 3000",
|
||||||
|
|||||||
Reference in New Issue
Block a user