Skip to content

Commit 0b56680

Browse files
Working on Jenkinsfile for Docker
1 parent 0560c5c commit 0b56680

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

JenkinsFileDocker

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,17 @@ pipeline
5757
sh 'docker rmi -f mithuntechnologies/logindockerjenkins:${buildNumber}'
5858
}
5959
}
60+
61+
stage('Deploy Application to Deployment Server')
62+
{
63+
steps()
64+
{
65+
sshagent(['DeploymentServer_SSH'])
66+
{
67+
sh "ssh -o StrictHostKeyChecking=no [email protected] docker rm -f mavenwebapplication || true"
68+
sh "ssh -o StrictHostKeyChecking=no [email protected] docker run -d --name mavenwebapplication -p 8080:8080 mithuntechnologies/logindockerjenkins:$Build_Number"
69+
}
70+
}
71+
}
6072
}
6173
}

0 commit comments

Comments
 (0)