-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
f037dcc
commit 930781c
Showing
6 changed files
with
125 additions
and
13 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
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,73 @@ | ||
/** | ||
* 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 | ||
) | ||
]) | ||
]) | ||
} | ||
} | ||
} | ||
|
||
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', '') //'1.41.0,1.42.1,1.43.0') | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
def promote(String platform, String version) { | ||
sshagent(['projects-storage.eclipse.org-bot-ssh']) { | ||
sh "ssh genie.theia@projects-storage.eclipse.org rm -rf /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
sh "ssh genie.theia@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
sh "scp genie.theia@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/*.* genie.theia@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/theia/ide/${version}/${platform}" | ||
|
||
sh "ssh genie.theia@projects-storage.eclipse.org rm -rf /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
sh "ssh genie.theia@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/theia/ide/latest/${platform}" | ||
sh "scp genie.theia@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}/*.* genie.theia@projects-storage.eclipse.org:/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 genie.theia@projects-storage.eclipse.org rm -f /home/data/httpd/download.eclipse.org/theia/ide/${oldVersion}/${platform}/${yaml}" | ||
sh "ssh genie.theia@projects-storage.eclipse.org 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