fix: 3 - Updating Jenkinsfile
Zakaria/ZenProject/pipeline/head There was a failure building this commit
Zenful/ZenProject/pipeline/head There was a failure building this commit

This commit is contained in:
2024-09-28 17:29:33 -04:00
parent c72122fea2
commit f0dfc063e1
Vendored
+11 -24
View File
@@ -2,35 +2,22 @@ pipeline {
agent any agent any
stages { stages {
stage('Checkout') { stage('Install Chrome and ChromeDriver') {
steps { steps {
// Checkout code from version control // Install Chrome and ChromeDriver if necessary (Linux environment)
git 'https://gitea.zacksolutions.dev/Zakaria/ZenProject.git' 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/'
} }
} }
stage('Run Tests') {
stage('Build') {
steps { steps {
// Build your project (if needed) // Run the tests in a headless Chrome environment
sh 'mvn clean install'
}
}
stage('Test') {
steps {
// Install dependencies
sh 'mvn dependency:resolve'
// Run browser tests
sh 'mvn test' sh 'mvn test'
} }
} }
}
}
stage('Generate Reports') {
steps {
// Generate and store test reports
sh 'mvn site'
}
}
}
}