From c804495ea4e514dc695c6fa15f3660d78d7d8108 Mon Sep 17 00:00:00 2001 From: nagasuribabukola <114101304+nagasuribabukola@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:24:55 +0530 Subject: [PATCH] added stash and unstash steps to Jenkinsfile --- Jenkinsfile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 17a1709c7..acc4f7515 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,5 +23,19 @@ pipeline { allowEmptyResults: false } } + + stage('Stash') { + steps { + stash name: 'artifact', + includes: '**/target/*.jar' + } + } + + stage('Unstash') { + agent { label 'JDK8' } + steps { + unstash name: 'artifact' + } + } } -} \ No newline at end of file +}