diff --git a/vars/uploadTidy.groovy b/vars/uploadTidy.groovy index e7a42d9..6b00cf8 100644 --- a/vars/uploadTidy.groovy +++ b/vars/uploadTidy.groovy @@ -22,9 +22,11 @@ mapping = 'metadata/columns.csv' } - def oldJobDraft = drafter.findDraftset(PMD, credentials, env.JOB_NAME) - if (oldJobDraft) { + try { + def oldJobDraft = drafter.findDraftset(PMD, credentials, env.JOB_NAME) drafter.deleteDraftset(PMD, credentials, oldJobDraft.id) + } catch(e) { + echo 'No old job draft to delete' } def newJobDraft = drafter.createDraftset(PMD, credentials, env.JOB_NAME)