From 35f6ed607af16fac09fe3982938c46e6fb5f56c0 Mon Sep 17 00:00:00 2001 From: Brady-Malott <55215446+Brady-Malott@users.noreply.github.com> Date: Fri, 17 Feb 2023 17:34:05 -0500 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ac750e5..6341189 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,15 @@ pipeline { sh 'docker build -t microblog:latest .' } } - stage("Hello To Discord") { + stage('Deploy') { + steps { + // Stop running microblog container + sh 'docker stop $(docker ps -q --filter ancestor=microblog:latest)' + // Deploy new container + sh 'docker run -d -p 5000:5000 microblog:latest + } + } + stage('Hello To Discord') { steps { echo ' Test to Discord' discordSend description: '', footer: '', image: '', link: 'http://3.91.14.163:8080', result: '', scmWebUrl: '', thumbnail: '', title: