Skip to content

Commit 7cad873

Browse files
authored
Create jenkinsfile
1 parent e41bc58 commit 7cad873

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

jenkinsfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pipeline {
2+
agent {
3+
label "ec2"
4+
}
5+
6+
stages {
7+
stage('Donwload the Code from GIthub') { //job1
8+
steps {
9+
sh "yum install git -y"
10+
git branch: 'main', url:'https://github.com/kaushalacts/PythonAppDevOps.git'
11+
echo "code downloaded successfully."
12+
}
13+
}
14+
stage('Unit Testing') { //job2
15+
steps{
16+
sh "yum install python3 pip -y"
17+
sh "pip3 install -r requirements.txt"
18+
sh "pytest"
19+
}
20+
}
21+
22+
}
23+
}

0 commit comments

Comments
 (0)