diff options
-rw-r--r-- | Jenkinsfile | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Jenkinsfile b/Jenkinsfile index 0a7bda553..9458f4f70 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,9 +14,7 @@ pipeline { stage('Checkout') { steps { script { - currentBuild.description = "This builds, tests and deploys the current artifact from archiva master branch." - REPO_DIR = "${PWD}/.repo-${env.JOB_NAME.replace('/', '_')}" - echo "Info: Job-Name=${JOB_NAME}, Branch=${BRANCH_NAME}, Workspace=${PWD}, Repo-Dir=${REPO_DIR}" + echo "Info: Job-Name=${JOB_NAME}, Branch=${BRANCH_NAME}, Workspace=${PWD}" } checkout scm } @@ -32,7 +30,7 @@ pipeline { timeout(120) { withMaven(maven: buildMvn, jdk: buildJdk, mavenSettingsConfig: deploySettings, - mavenLocalRepo: REPO_DIR + mavenLocalRepo: ".repository" ) { sh "chmod 755 ./src/ci/scripts/prepareWorkspace.sh" @@ -69,7 +67,7 @@ pipeline { timeout(120) { withMaven(maven: buildMvn, jdk: buildJdk, mavenSettingsConfig: deploySettings, - mavenLocalRepo: REPO_DIR + mavenLocalRepo: ".repository" ) { sh "mvn deploy -B -Dmaven.test.skip=true" @@ -88,6 +86,9 @@ pipeline { unstable { notifyBuild("Unstable Build") } + always { + cleanWs deleteDirs: true, notFailBuild: true, patterns: [[pattern: '.repository', type: 'EXCLUDE']] + } } } |