forked from LondheShubham153/node-todo-cicd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
32 lines (29 loc) · 754 Bytes
/
Jenkinsfile
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
pipeline{
agent any
stages{
stage("Code")
{
steps{
git 'https://github.com/amitmaurya07/Project_node-todo-cicd.git'
}
}
stage("Build the Docker Image")
{
agent{
docker{
image 'amaurya07/to-do-django-react:1'
reuseNode true
}
}
steps{
echo 'Image has been built'
}
}
stage("Run the Container")
{
steps{
sh 'docker run -d --name django-container -p 8000:8000 amaurya07/to-do-django-react:1'
}
}
}
}