Skip to content

Commit 53bc9f9

Browse files
authored
Create Jenkinsfile
1 parent 3fa2645 commit 53bc9f9

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Jenkinsfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
pipeline {
2+
agent any
3+
4+
stages {
5+
stage('Checkout') {
6+
steps {
7+
// Checkout the source code from your version control system
8+
// For example, using Git
9+
git 'https://github.com/deepanshusri/java-testng-selenium.git'
10+
}
11+
}
12+
13+
stage('Build') {
14+
steps {
15+
// Build your Java project
16+
// For example, using Apache Maven
17+
bat 'mvn clean package'
18+
bat 'mvn install'
19+
}
20+
}
21+
22+
stage('Test') {
23+
steps {
24+
// Run tests for your Java project
25+
// For example, using Apache Maven
26+
// bat 'mvn test'
27+
bat 'mvn test -D suite=single.xml'
28+
}
29+
}
30+
31+
stage('Deploy') {
32+
steps {
33+
// Deploy your Java project to a server or a container
34+
// For example, using Docker
35+
bat 'docker build -t your-image .'
36+
bat 'docker run -d -p 8080:8080 your-image'
37+
}
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)