From 4b31d59b1f1a29156e4f6e99747e70310141c620 Mon Sep 17 00:00:00 2001 From: Oleksandr Butenko <58562385+sprientera992@users.noreply.github.com> Date: Sun, 13 Jun 2021 12:52:57 +0300 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 73cd58e92..7d42a5490 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,18 @@ pipeline { echo 'Running build automation' sh './mvnw package } - } - } -} + } + stage('Build Docker Image') { + when { + branch 'main' + } + steps { + script { + app = docker.build("sprientera/pets") + app.inside { + sh 'echo $(curl localhost:80)' + } + } + } + } + }