From 1efbd590a3d48f77ea8f732f9e713a7789ce337b Mon Sep 17 00:00:00 2001 From: Philippe DUL Date: Tue, 14 Mar 2023 12:12:21 +0100 Subject: [PATCH] [releng] Add xhtml docgen deployer --- vars/deployer.groovy | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/vars/deployer.groovy b/vars/deployer.groovy index 3f61822..9e6e915 100644 --- a/vars/deployer.groovy +++ b/vars/deployer.groovy @@ -81,6 +81,25 @@ def addonNightlyProduct(String inputPath, String outputDirName) { } } +def cleanAddonNightlyArtefacts(String outputDirName) { + def addonDirName = getAddonDirName() + + if(addonDirName.isEmpty()) { + log.error("Deployment Error: ${GIT_URL} repository is not recognised") + } + else { + def dropinPath = getFullAddonDropinsPath(addonDirName, outputDirName) + def updateSitePath = getFullAddonDropinsUpdateSitePath(addonDirName, outputDirName) + def sshAccount = getSSHAccount() + + sshagent (['projects-storage.eclipse.org-bot-ssh']) { + sh "ssh ${sshAccount} rm -rf ${dropinPath}" + sh "ssh ${sshAccount} rm -rf ${updateSitePath}" + } + } +} + + /** * Extracts the addon directory name from the git branch. */ @@ -108,6 +127,9 @@ private def getAddonDirName() { case ~/.*capella-vpms.*/: return 'vpms' + case ~/.*capella-xhtml-docgen.*/: + return 'xhtmldocgen' + default: return '' }