Skip to content

Commit

Permalink
[releng] Allow latest official releases
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe DUL <philippe.dul@thalesgroup.com>
  • Loading branch information
pdulth committed Jan 4, 2023
1 parent ce7f8d6 commit e967380
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions vars/capella.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
def getDownloadURL(branch = "master", platform = "win", proxy = ""){

def url = "https://download.eclipse.org/capella/core/products/nightly/${branch}/"
switch(branch){
case '5.2.0':
url = "https://download.eclipse.org/capella/core/products/releases/5.2.0-R20211130-125709/"
break
case '1.4.2':
url = "https://download.eclipse.org/capella/core/products/releases/1.4.2-R20201014-090868/"
break
case ~/\d\.\d\.\d/:
url = "https://download.eclipse.org/capella/core/products/releases/${branch}/"
break
default:
break
}

def script = proxy.isEmpty() ? "curl -ks ${url}" : "curl -ks -x ${proxy} ${url}"

def html = sh(script: "${script}", returnStdout: true)
Expand All @@ -12,12 +26,12 @@ def getDownloadURL(branch = "master", platform = "win", proxy = ""){
regex = /(capella-[\d.]*-macosx-cocoa-x86_64.tar.gz)/
break

case ~/linux/:
case ~/linux/:
if (branch.startsWith('1.')) {
regex = /(capella-[\d.]*-linux-gtk-x86_64.zip)/
} else {
regex = /(capella-[\d.]*-linux-gtk-x86_64.tar.gz)/
}
}
break

case ~/win/:
Expand All @@ -35,7 +49,16 @@ def getDownloadURL(branch = "master", platform = "win", proxy = ""){
}

def getUpdateSiteURL(branch = "master") {
return "https://download.eclipse.org/capella/core/updates/nightly/${branch}/"
switch(branch){
case '5.2.0':
return "https://download.eclipse.org/capella/core/updates/releases/5.2.0-R20211130-125709/"
case '1.4.2':
return "https://download.eclipse.org/capella/core/updates/releases/1.4.2-R20201014-090868/"
case ~/\d\.\d\.\d/:
return "https://download.eclipse.org/capella/core/updates/releases/${branch}/"
default:
return "https://download.eclipse.org/capella/core/updates/nightly/${branch}/"
}
}

def getTestUpdateSiteURL(branch = "master") {
Expand Down

0 comments on commit e967380

Please sign in to comment.