forked from datyrlab/selenium-webdriver
-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathJenkinsfile6
More file actions
38 lines (38 loc) · 1000 Bytes
/
Jenkinsfile6
File metadata and controls
38 lines (38 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
pipeline {
agent any
environment {
IMAGE_NAME = "selenium-test"
}
stages {
stage('Clone Repository') {
steps {
script {
// Clone the Git repository
git poll: false, url: 'https://github.com/mimrancomsats/selenium-webdriver.git'
}
}
}
stage('Build Docker Image') {
steps {
script {
// Build the Docker image
sh 'docker build -t $IMAGE_NAME .'
}
}
}
stage('Run Selenium Tests') {
steps {
script {
// Run the Docker container and execute the tests
sh 'docker run --rm $IMAGE_NAME'
}
}
}
}
post {
always {
// Cleanup: remove any unused images, volumes, etc.
sh 'docker system prune -f'
}
}
}