From f111398d8af66e6f9a241e746a769652b1a1422f Mon Sep 17 00:00:00 2001 From: senatorovv <61406888+senatorovv@users.noreply.github.com> Date: Wed, 12 Jul 2023 11:56:28 +0400 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ded6cd5a6..da3547016 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,28 +1,12 @@ #!groovy - pipeline { - agent none stages { + agent none + stages { stage('Maven Install') { - agent any - + agent any steps { sh 'mvn clean install' } } - stage('Docker Build') { - agent any - steps { - sh 'docker build -t registry.hub.docker.com/hybrid2k3/petclinic:1 .' - } - } - stage('Docker Push') { - agent any - steps { - withCredentials([usernamePassword(credentialsId: 'dockerHub', passwordVariable: 'dockerHubPassword', usernameVariable: 'dockerHubUser')]) { - sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPassword}" - sh 'registry.hub.docker.com/hybrid2k3/petclinic:1' - } - } - } } }