Skip to content

Commit 8e6dab1

Browse files
authored
Create Jenkinsfile
1 parent 9178903 commit 8e6dab1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

projects/age-calculator/Jenkinsfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
pipeline {
2+
agent {label "kritika"}
3+
4+
stages {
5+
stage('Code') {
6+
steps {
7+
echo 'This is a cloning part'
8+
git url:"https://github.com/Kritika70/HTML-CSS-JavaScript-projects-for-beginners", branch:"main"
9+
echo "Cloning Successful"
10+
}
11+
}
12+
stage('Deploy'){
13+
steps{
14+
echo "Deploying to Apache server...."
15+
sh "sudo cp -r /home/ubuntu/workspace/practice-jenkins/projects/age-calculator/* /var/www/html/"
16+
}
17+
}
18+
}
19+
post{
20+
success{
21+
echo 'Deployment Successful!'
22+
}
23+
failure{
24+
echo 'Deployment failure'
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)