From 3f5434af925fe8f134444c992906c8d6c44b38cb Mon Sep 17 00:00:00 2001 From: KPOTY Kpotivi <kpotivi.kpoty@etu.univ-amu.fr> Date: Sat, 8 Jun 2024 20:49:11 +0000 Subject: [PATCH] modif jenkinsfile --- Jenkinsfile | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6dcc072..b980efe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,57 +1,47 @@ pipeline { - agent any - tools { maven 'maven3' } - options { buildDiscarder logRotator( - daysToKeepStr: '15', - numToKeepStr: '10' - ) + daysToKeepStr: '15', + numToKeepStr: '10' + ) } - environment { APP_NAME = "DCUBE_APP" APP_ENV = "DEV" } - stages { - stage('Cleanup Workspace') { steps { cleanWs() - sh """ + bat """ echo "Cleaned Up Workspace for ${APP_NAME}" """ } } - stage('Code Checkout') { steps { checkout([ $class: 'GitSCM', branches: [[name: '*/main']], - userRemoteConfigs: [[url: 'https://etulab.univ-amu.fr/k19025322/pipeline-as-code.git']] + userRemoteConfigs: [[url: 'https://github.com/spring-projects/spring-petclinic.git']] ]) } } - stage('Code Build') { steps { - sh 'mvn install -Dmaven.test.skip=true' + bat 'mvn install -Dmaven.test.skip=true' } } - - stage('Priting All Global Variables') { + stage('Printing All Global Variables') { steps { - sh """ - env + bat """ + set """ } } - } } \ No newline at end of file -- GitLab