diff --git a/build/Dockerfile b/build/Dockerfile index 128c63b..f8be148 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,3 +1,9 @@ -FROM node:18.17.1-bookworm +FROM mcr.microsoft.com/playwright:v1.40.1-jammy + +RUN apt-get update &&\ + apt-get install software-properties-common -y &&\ + apt-add-repository universe -y &&\ + apt-get update &&\ + apt-get install openjdk-17-jdk maven -y USER node diff --git a/build/Jenkinsfile b/build/Jenkinsfile index 80abc36..ed50638 100644 --- a/build/Jenkinsfile +++ b/build/Jenkinsfile @@ -23,6 +23,18 @@ pipeline { } } } + stage('NPM:test') { + steps { + script { + catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { + docker.build('node', '-f build/Dockerfile .').inside { + sh 'npm run test' + } + } + archiveArtifacts artifacts: 'playwright-report/**', allowEmptyArchive: false + } + } + } stage('Deploy') { when { expression { isReleaseOrMasterBranch() && currentBuild.changeSets.size() > 0 }