Skip to content

Commit

Permalink
Merge branch 'master' into x/jf/local-theia-build
Browse files Browse the repository at this point in the history
  • Loading branch information
jfaltermeier committed Aug 1, 2024
2 parents d9c2f45 + eee0a28 commit 8ec444d
Show file tree
Hide file tree
Showing 42 changed files with 5,140 additions and 4,375 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, ubuntu-latest, macos-11]
node: ['16.x']
os: [windows-2019, ubuntu-latest, macos-14]
node: ['20.x']

runs-on: ${{ matrix.os }}
timeout-minutes: 60
Expand All @@ -37,10 +37,10 @@ jobs:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'

- name: Use Python 3.x
- name: Use Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.10.8'
python-version: '3.11'

- name: Build and package
shell: bash
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/license-check-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 3PP License Check

on:
push:
branches:
- master
workflow_dispatch:
pull_request:
branches:
- master
schedule:
- cron: '0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule

jobs:

License-check:
name: 3PP License Check using dash-licenses

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18]
java: [11]

runs-on: ${{ matrix.os }}
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Use Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}

- name: Run dash-licenses
shell: bash
run: |
yarn --frozen-lockfile --ignore-scripts
yarn license:check
env:
DASH_TOKEN: ${{ secrets.DASH_LICENSES_PAT }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
**/gen-webpack.node.config.js
**/plugins
**/tsconfig.tsbuildinfo
*.log
*.log
license-check-summary.txt*
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

# We still want Ubuntu 20.04 LTS compatibility, which is based on bullseye
# -> buster is old enough
FROM node:16.14.2-buster
FROM node:20.11.1-buster
RUN apt-get update && apt-get install -y libxkbfile-dev libsecret-1-dev python3
40 changes: 21 additions & 19 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ pipeline {
// We will still stop short of publishing anything.
THEIA_IDE_JENKINS_RELEASE_DRYRUN = 'false'
// THEIA_IDE_JENKINS_RELEASE_DRYRUN = 'true'
msvs_version = '2019'
GYP_MSVS_VERSION = '2019'
}
stages {
stage('Build') {
Expand Down Expand Up @@ -136,10 +138,10 @@ spec:
agent {
label 'windows'
}
steps {
script {
sh "npm config set msvs_version 2017"
sh "npx node-gyp@9.4.0 install 14.20.0"
steps {
nodejs(nodeJSInstallationName: 'node_20.x') {
sh "node --version"
sh "npx node-gyp@9.4.1 install 20.11.1"

// analyze memory usage
bat "wmic ComputerSystem get TotalPhysicalMemory"
Expand Down Expand Up @@ -261,7 +263,7 @@ spec:
container('jnlp') {
script {
uploadInstaller('windows')
copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', '1.41.0,1.42.1,1.43.0')
copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', '1.46.0,1.46.100,1.47.0,1.47.100,1.48.0,1.48.300,1.49.100,1.49.101,1.50.0,1.50.100,1.51.0')
}
}
}
Expand All @@ -272,11 +274,11 @@ spec:
}

def buildInstaller(int sleepBetweenRetries) {
int maxRetry = 3
int maxRetry = 1
String buildPackageCmd

checkout scm

// only build the Electron app for now
buildPackageCmd = 'yarn --frozen-lockfile --force && \
yarn build:extensions && yarn electron build'
Expand Down Expand Up @@ -399,12 +401,12 @@ def uploadInstaller(String platform) {
def packageJSON = readJSON file: "package.json"
String version = "${packageJSON.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/${version}/${platform}"
sh "ssh genie.theia@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/theia/${version}/${platform}"
sh "scp ${distFolder}/*.* genie.theia@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/theia/${version}/${platform}"
sh "ssh genie.theia@projects-storage.eclipse.org rm -rf /home/data/httpd/download.eclipse.org/theia/latest/${platform}"
sh "ssh genie.theia@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/theia/latest/${platform}"
sh "scp ${distFolder}/*.* genie.theia@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/theia/latest/${platform}"
sh "ssh genie.theia@projects-storage.eclipse.org rm -rf /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}"
sh "ssh genie.theia@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}"
sh "scp ${distFolder}/*.* genie.theia@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/theia/ide-preview/${version}/${platform}"
sh "ssh genie.theia@projects-storage.eclipse.org rm -rf /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}"
sh "ssh genie.theia@projects-storage.eclipse.org mkdir -p /home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}"
sh "scp ${distFolder}/*.* genie.theia@projects-storage.eclipse.org:/home/data/httpd/download.eclipse.org/theia/ide-preview/latest/${platform}"
}
} else {
echo "Skipped upload for branch ${env.BRANCH_NAME}"
Expand All @@ -421,16 +423,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 genie.theia@projects-storage.eclipse.org cp /home/data/httpd/download.eclipse.org/theia/latest/${platform}/${installer}.${extension} /home/data/httpd/download.eclipse.org/theia/latest/${platform}/${installer}-${version}.${extension}"
sh "ssh genie.theia@projects-storage.eclipse.org cp /home/data/httpd/download.eclipse.org/theia/${version}/${platform}/${installer}.${extension} /home/data/httpd/download.eclipse.org/theia/${version}/${platform}/${installer}-${version}.${extension}"
sh "ssh genie.theia@projects-storage.eclipse.org cp /home/data/httpd/download.eclipse.org/theia/latest/${platform}/${installer}.${extension}.blockmap /home/data/httpd/download.eclipse.org/theia/latest/${platform}/${installer}-${version}.${extension}.blockmap"
sh "ssh genie.theia@projects-storage.eclipse.org cp /home/data/httpd/download.eclipse.org/theia/${version}/${platform}/${installer}.${extension}.blockmap /home/data/httpd/download.eclipse.org/theia/${version}/${platform}/${installer}-${version}.${extension}.blockmap"
sh "ssh genie.theia@projects-storage.eclipse.org 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 genie.theia@projects-storage.eclipse.org 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 genie.theia@projects-storage.eclipse.org 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 genie.theia@projects-storage.eclipse.org 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 genie.theia@projects-storage.eclipse.org rm -f /home/data/httpd/download.eclipse.org/theia/${oldVersion}/${platform}/${yaml}"
sh "ssh genie.theia@projects-storage.eclipse.org cp /home/data/httpd/download.eclipse.org/theia/${version}/${platform}/${yaml} /home/data/httpd/download.eclipse.org/theia/${oldVersion}/${platform}/${yaml}"
sh "ssh genie.theia@projects-storage.eclipse.org rm -f /home/data/httpd/download.eclipse.org/theia/ide-preview/${oldVersion}/${platform}/${yaml}"
sh "ssh genie.theia@projects-storage.eclipse.org 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 {
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Eclipse Theia Blueprint Authors
Copyright (c) 2020 Eclipse Theia IDE Authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
89 changes: 89 additions & 0 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Publishing

This guide contains the steps to publish a new version of the Theia IDE. The preview, testing and release process is described in [this section](#preview-testing-and-release-process-for-the-theia-ide)

Every commit to master will be published as a preview version.
Updates will only work when there was a version change.

## Update Package Versions and Theia

If there was *no* Theia release we usually want to increment the patch version by 1, e.g. 1.47.100 -> 1.47.101.

If there was a new Theia *minor* release, e.g. 1.48.0, we want to use the same version as Theia.

If there was a new Theia *patch* release, e.g. 1.48.1, we use Theia's patch version multiplied by 100, e.g. 1.48.100.

```sh
# Update mono repo version
yarn version --no-git-tag-version

# Update version of all packages
yarn lerna version --exact --no-push --no-git-tag-version

# If there was a Theia release, update Theia dependencies
yarn update:theia 1.48.0 && yarn update:theia:children 1.48.0

# Update yarn.lock
yarn
```

If there was a Theia Release

* check if there are any breaking changes
* check if new built-ins are available
* check if any changes were made to the sample applications (e.g. new packages or additional configuration)

and adapt the code/built-ins accordingly.

Next, update the `Jenkinsfile`'s `copyInstallerAndUpdateLatestYml` invocation for windows. Here we have to specficy for which olders versions we want to enable direct (incremental) updates to this version on Windows.\
See <https://download.eclipse.org/theia/ide-preview/> for the available old versions.\
*We plan to automate this, but at the moment it's a manual step.*

E.g.:\
`copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', '1.46.0,1.46.100,1.47.0')`\
->\
`copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', '1.46.0,1.46.100,1.47.0,1.47.100')`

Finally, open a PR with your changes.

## Upgrade Dependencies

We want to run `yarn upgrade` regularily to get the latest versions of our dependencies.
You may want to keep this in a separate PR as this might require IP Reviews from the Eclipse Foundation and may take some time.
After an upgrade you should check the used `electron` version in the `yarn.lock`.
If there was an update, update `electronVersion` in `applications/electron/electron-builder.yml` accordingly.

## Promote IDE from Preview to Stable Channel

You can promote the IDE via this [Build Job](https://ci.eclipse.org/theia/job/Theia%20-%20Promote%20IDE/).

In `VERSION` specfiy which version to copy from <https://download.eclipse.org/theia/ide-preview/>, e.g. 1.48.0.

In `TOUPDATE` specify the older versions for which you want to enable direct (incremental) updates on windows.\
See <https://download.eclipse.org/theia/ide/> for the old releases.
E.g. `1.45.0,1.46.100,1.47.100`.\
*We plan to automate this, but at the moment it's a required parameter.*

## Publish Docker Image

Run this [workflow](https://github.com/eclipse-theia/theia-blueprint/actions/workflows/publish-theia-ide-img.yml) from the master branch.

## Preview, Testing and Release Process for the Theia IDE

Once a new Theia Platform release is available, the Theia IDE is updated to the new version. This automatically makes a new preview build available (see above). Once the preview build is successfully tested by the preview testers, it is published as a new official version, also available for automatic update. The detailed steps for this process are described in the following:

1. Create a new preview version of the Theia IDE as decribed above (do not publish as stable yet)
2. Create a new discussion [here](https://github.com/eclipse-theia/theia/discussions) based on the following template:
>Theia IDE 1.xz preview testing</br></br>
>The new version 1.XZ.0 of the Theia IDE is available on the preview channel now, please join the preview testing! You can download it here: {link to the download}. You can update your existing installation by setting the preference *updates.channel* to *preview*.
Please respond here when you were able to test the preview without finding blockers, by commenting with a :heavy_check_mark:. If you find any issues, please mention them in this thread and report them as an issue once confirmed by other testers.

3. Announce availability of the preview release on theia-dev@eclipse.org based on the following template:
>Theia IDE 1.xz preview</br></br>
>Hi,</br></br>The new version 1.XZ.0 of the Theia IDE is available on the preview channel now. Please join the preview test and help us stabilizing the release. Please visit this discussion for more information and for coordination: {link to the Github discussion created above}</br></br>best regards,
4. Fix reported blockers and create patch releases (This is a community effort and typically takes 1-2 weeks)
5. Once no blockers are left, declare the release final (see publishing above).
6. Post official release announcement

**If too many issues are found, fixes take too long or no corresponding ressources are available to fix things, a Theia IDE release might be skipped. This means, it will not update to a new Theia version, but wait for the next version.**
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Eclipse Theia IDE/Blueprint also serves as a template for building desktop-based

[Main Theia Repository](https://github.com/eclipse-theia/theia)

[Visit the Theia website](http://www.theia-ide.org) for more [documentation](https://theia-ide.org/docs/blueprint_documentation/).
[Visit the Theia website](http://www.theia-ide.org) for more documentation: [Using the Theia IDE](https://theia-ide.org/docs/user_getting_started/), [Packaging Theia as a Desktop Product](https://theia-ide.org/docs/blueprint_documentation/).

## License

Expand All @@ -34,7 +34,7 @@ Eclipse Theia IDE/Blueprint also serves as a template for building desktop-based
## What is this?

The Eclipse IDE is a modern and open IDE for cloud and desktop. The Theia IDE is based on the [Theia platform](https://theia-ide.org).
The Theia IDE is available as a [downloadable desktop application](https://theia-ide.org//#theiaidedownload). You can also try the latest version of the Theia IDE online. The online test version is limited to 30 minutes per session and hosted via Theia.cloud.
The Theia IDE is available as a [downloadable desktop application](https://theia-ide.org//#theiaidedownload). You can also try the latest version of the Theia IDE online. The online test version is limited to 30 minutes per session and hosted via Theia.cloud. Finally, we provide an [experimental Docker image](#docker) for hosting the Theia IDE online.

The Eclipse Theia IDE also serves as a **template** for building desktop-based products based on the Eclipse Theia platform, as well as to showcase Eclipse Theia capabilities. It is made up of a subset of existing Eclipse Theia features and extensions. [Documentation is available](https://theia-ide.org/docs/composing_applications/) to help you customize and build your own Eclipse Theia-based product.

Expand Down Expand Up @@ -129,9 +129,12 @@ and connect to <http://localhost:3000/>
The features in the Eclipse Theia IDE are based on Theia and the included extensions/plugins. For bugs in Theia please consider opening an issue in the [Theia project on Github](https://github.com/eclipse-theia/theia/issues/new/choose).
The Eclipse Theia IDE only packages existing functionality into a product and installers for the product. If you believe there is a mistake in packaging, something needs to be added to the packaging or the installers do not work properly, please [open an issue on Github](https://github.com/eclipse-theia/theia-blueprint/issues/new/choose) to let us know.

### Docker Build
### Docker

You can create a Docker Image for the Eclipse Theia IDE based on the browser app with the following build command:
The Docker image of the Theia IDE is currently in *experimental state*. It is built from the same sources and packages as the desktop version, but it is not part of the [preview test](https://github.com/eclipse-theia/theia-blueprint/blob/master/PUBLISHING.md#preview-testing-and-release-process-for-the-theia-ide).
You can find a prebuilt Docker image of the IDE [here](https://github.com/eclipse-theia/theia-blueprint/pkgs/container/theia-blueprint%2Ftheia-ide).

You can also create the Docker image for the Eclipse Theia IDE based on the browser app with the following build command:

```sh
docker build -t theia-ide -f browser.Dockerfile .
Expand Down
Binary file added applications/browser/ico/favicon.ico
Binary file not shown.
Loading

0 comments on commit 8ec444d

Please sign in to comment.