Skip to content

Commit

Permalink
[releng] Add xhtml docgen deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
pdulth committed Jun 13, 2023
1 parent 9d9b2d8 commit 1efbd59
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions vars/deployer.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -108,6 +127,9 @@ private def getAddonDirName() {
case ~/.*capella-vpms.*/:
return 'vpms'

case ~/.*capella-xhtml-docgen.*/:
return 'xhtmldocgen'

default:
return ''
}
Expand Down

0 comments on commit 1efbd59

Please sign in to comment.