From 5ebe3d12dfce0f5203993abe21cb13f7b4857696 Mon Sep 17 00:00:00 2001 From: Mike Chang Date: Wed, 26 Jan 2022 17:11:58 -0800 Subject: [PATCH] Add file exists conditional for ebs_snapshot stash command (#7178) Signed-off-by: Mike Chang --- scripts/build/Jenkins/Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index e4957992a5..b21d9d832d 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -845,8 +845,10 @@ try { // Stash the INCREMENTAL_BUILD_SCRIPT_PATH and EBS_SNAPSHOT_SCRIPT_PATH since all nodes will use it stash name: 'incremental_build_script', includes: INCREMENTAL_BUILD_SCRIPT_PATH - stash name: 'ebs_snapshot_script', + if (fileExists(EBS_SNAPSHOT_SCRIPT_PATH)) { + stash name: 'ebs_snapshot_script', includes: EBS_SNAPSHOT_SCRIPT_PATH + } } } }