fix: 4 - Updating Jenkinsfile
This commit is contained in:
parent
f0dfc063e1
commit
54fbd3e326
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
@ -2,22 +2,35 @@ pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('Install Chrome and ChromeDriver') {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
// Install Chrome and ChromeDriver if necessary (Linux environment)
|
||||
sh 'sudo apt-get update'
|
||||
sh 'sudo apt-get install -y google-chrome-stable'
|
||||
sh 'wget https://chromedriver.storage.googleapis.com/$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip'
|
||||
sh 'unzip chromedriver_linux64.zip'
|
||||
sh 'sudo mv chromedriver /usr/local/bin/'
|
||||
// Checkout code from version control
|
||||
git 'https://gitea.zacksolutions.dev/Zakaria/ZenProject.git'
|
||||
}
|
||||
}
|
||||
stage('Run Tests') {
|
||||
|
||||
stage('Build') {
|
||||
steps {
|
||||
// Run the tests in a headless Chrome environment
|
||||
// Build your project (if needed)
|
||||
sh 'mvn clean install'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
steps {
|
||||
// Install dependencies
|
||||
sh 'mvn dependency:resolve'
|
||||
|
||||
// Run browser tests
|
||||
sh 'mvn test'
|
||||
}
|
||||
}
|
||||
|
||||
stage('Generate Reports') {
|
||||
steps {
|
||||
// Generate and store test reports
|
||||
sh 'mvn site'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user