Skip to content

Commit

Permalink
Add the possibility to publish add-on product
Browse files Browse the repository at this point in the history
Change-Id: Iad797cf7928a33c7221c4bde6803404921f0adf5
Signed-off-by: Tu Ton <minhtutonthat@gmail.com>
  • Loading branch information
minhtutonthat authored and sandupostaru committed Mar 24, 2020
1 parent 24c3e19 commit 94255f9
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion vars/deployer.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@ def addonNightlyUpdateSite(String inputPath, String outputDirName) {
}
}

def addonNightlyProduct(String inputPath, String outputDirName) {
def addonDirName = getAddonDirName()

if(addonDirName.isEmpty()) {
log.error("Deployment Error: ${GIT_URL} repository is not recognised")
}
else {
def outputPath = getFullAddonProductPath(addonDirName, outputDirName)
def sshAccount = getSSHAccount()

sshagent (['projects-storage.eclipse.org-bot-ssh']) {
sh "ssh ${sshAccount} mkdir -p ${outputPath}"
sh "scp -rp ${inputPath} ${sshAccount}:${outputPath}"
}
}
}

/**
* Extracts the addon directory name from the git branch.
Expand Down Expand Up @@ -106,4 +122,8 @@ private def getFullAddonDropinsPath(String addonDirName, String dirName) {

private def getFullAddonDropinsUpdateSitePath(String rootDirName, String dirName) {
return "/home/data/httpd/download.eclipse.org/capella/addons/${addonDirName}/updates/nightly/${dirName}/"
}
}

private def getFullAddonProductPath(String rootDirName, String dirName) {
return "/home/data/httpd/download.eclipse.org/capella/addons/${addonDirName}/products/nightly/${dirName}/"
}

0 comments on commit 94255f9

Please sign in to comment.