From c96b645de92006a35a6a7aa457cc3eab5994d080 Mon Sep 17 00:00:00 2001 From: ashirali12 <114212324+ashirali12@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:03:05 +0500 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b6c34792..d2eef1bd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,15 +1,7 @@ -currentBuild.displayName = "Final_Demo # "+currentBuild.number - - def getDockerTag(){ - def tag = sh script: 'git rev-parse HEAD', returnStdout: true - return tag - } - - pipeline{ agent any - environment{ - Docker_tag = getDockerTag() + options { + buildDiscarder(logRotator(numToKeepStr: '5')) } stages{ @@ -25,7 +17,7 @@ pipeline{ } steps{ script{ - withSonarQubeEnv('sonarserver') { + withSonarQubeEnv('sq1') { sh "mvn sonar:sonar" } timeout(time: 1, unit: 'HOURS') {