forked from eclipse-theia/theia-ide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Update Channels eclipse-theia#278
* adapt main build Jenkinsfile to not publish at the release location "theia/ide" but at "theia/ide-preview" * create dedicated * add a preference for selecting an update channel * add additional method to updater that allows passing the channel Contributed on behalf of STMicroelectronics Signed-off-by: Johannes Faltermeier <[email protected]>
- Loading branch information
1 parent
f037dcc
commit df3815e
Showing
6 changed files
with
149 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -399,12 +399,12 @@ def uploadInstaller(String platform) { | |
def packageJSON = readJSON file: "package.json" | ||
String version = "${packageJSON.version}" | ||
sshagent(['projects-storage.eclipse.org-bot-ssh']) { | ||
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
sh "ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
sh "scp ${distFolder}/*.* [email protected]:/home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
sh "ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
sh "scp ${distFolder}/*.* [email protected]:/home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}" | ||
sh "ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}" | ||
sh "scp ${distFolder}/*.* [email protected]:/home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}" | ||
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}" | ||
sh "ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}" | ||
sh "scp ${distFolder}/*.* [email protected]:/home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}" | ||
} | ||
} else { | ||
echo "Skipped upload for branch ${env.BRANCH_NAME}" | ||
|
@@ -421,16 +421,16 @@ def copyInstallerAndUpdateLatestYml(String platform, String installer, String ex | |
def packageJSON = readJSON file: "package.json" | ||
String version = "${packageJSON.version}" | ||
sshagent(['projects-storage.eclipse.org-bot-ssh']) { | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}/${installer}.${extension} /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}/${installer}-${version}.${extension}" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}/${installer}.${extension} /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}/${installer}-${version}.${extension}" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}/${installer}.${extension}.blockmap /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}/${installer}-${version}.${extension}.blockmap" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}/${installer}.${extension}.blockmap /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}/${installer}-${version}.${extension}.blockmap" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}/${installer}.${extension} /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}/${installer}-${version}.${extension}" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/${installer}.${extension} /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/${installer}-${version}.${extension}" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}/${installer}.${extension}.blockmap /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}/${installer}-${version}.${extension}.blockmap" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/${installer}.${extension}.blockmap /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/${installer}-${version}.${extension}.blockmap" | ||
} | ||
if (UPDATABLE_VERSIONS.length() != 0) { | ||
for (oldVersion in UPDATABLE_VERSIONS.split(",")) { | ||
sshagent(['projects-storage.eclipse.org-bot-ssh']) { | ||
sh "ssh [email protected] rm -f /home/data/httpd/download.eclipse.org/theia/ide/${oldVersion}/${platform}/${yaml}" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}/${yaml} /home/data/httpd/download.eclipse.org/theia/ide/${oldVersion}/${platform}/${yaml}" | ||
sh "ssh [email protected] rm -f /home/data/httpd/download.eclipse.org/theia/ide-preview/${oldVersion}/${platform}/${yaml}" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/${yaml} /home/data/httpd/download.eclipse.org/theia/ide-preview/${oldVersion}/${platform}/${yaml}" | ||
} | ||
} | ||
} else { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/** | ||
* This Jenkinsfile promotes a given version of the Theia IDE from /theia/ide-preview to /theia/ide | ||
*/ | ||
|
||
/* groovylint-disable NestedBlockDepth */ | ||
import groovy.json.JsonSlurper | ||
|
||
pipeline { | ||
agent none | ||
options { | ||
timeout(time: 3, unit: 'HOURS') | ||
disableConcurrentBuilds() | ||
} | ||
environment { | ||
} | ||
stages { | ||
|
||
stage('Setup parameters') { | ||
steps { | ||
script { | ||
properties([ | ||
parameters([ | ||
string( | ||
defaultValue: 'latest', | ||
name: 'VERSION', | ||
trim: true | ||
), | ||
string( | ||
defaultValue: '1.41.0,1.42.1,1.43.0', | ||
name: 'TOUPDATE', | ||
trim: true | ||
) | ||
]) | ||
]) | ||
} | ||
} | ||
} | ||
|
||
stage('Promote') { | ||
agent any | ||
steps { | ||
script { | ||
promote('linux', params.VERSION) | ||
promote('macos', params.VERSION) | ||
promote('windows', params.VERSION) | ||
|
||
// update latest.yaml on windows for differential updater | ||
updateLatestYaml('windows', params.VERSION, 'TheiaIDESetup', 'exe', 'latest.yml', params.TOUPDATE) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
def promote(String platform, String version) { | ||
sshagent(['projects-storage.eclipse.org-bot-ssh']) { | ||
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
sh "ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
sh "scp [email protected]:/home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/*.* [email protected]:/home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
|
||
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
sh "ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
sh "scp [email protected]:/home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/*.* [email protected]:/home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
} | ||
} | ||
|
||
def updateLatestYaml(String platform, String version, String installer, String extension, String yaml, String UPDATABLE_VERSIONS) { | ||
if (UPDATABLE_VERSIONS.length() != 0) { | ||
for (oldVersion in UPDATABLE_VERSIONS.split(",")) { | ||
sshagent(['projects-storage.eclipse.org-bot-ssh']) { | ||
sh "ssh [email protected] rm -f /home/data/httpd/download.eclipse.org/theia/ide/${oldVersion}/${platform}/${yaml}" | ||
sh "ssh [email protected] cp /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}/${yaml} /home/data/httpd/download.eclipse.org/theia/ide/${oldVersion}/${platform}/${yaml}" | ||
} | ||
} | ||
} else { | ||
echo "No updateable versions" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters