Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' of github.com:eclipse/che-theia into dontSetPubli…
Browse files Browse the repository at this point in the history
…cUrlValueToInternalUrlSettings
  • Loading branch information
AndrienkoAleksandr committed Jul 28, 2021
2 parents ceac0bf + cfc26e5 commit abc40e7
Show file tree
Hide file tree
Showing 27 changed files with 198 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ devfiles/** @azatsarynnyy @RomanNikitenko @vzhukovs @benoitf
dockerfiles/** @azatsarynnyy @RomanNikitenko @vzhukovs @benoitf
extensions/** @azatsarynnyy @RomanNikitenko @vzhukovs @benoitf
generator/** @azatsarynnyy @RomanNikitenko @vzhukovs @benoitf
plugins/** @ericwill @vinokurig @vitaliy-guliy @svor @tsmaeder @benoitf @sunix
plugins/** @vinokurig @vitaliy-guliy @svor @tsmaeder @benoitf @sunix
2 changes: 1 addition & 1 deletion .github/workflows/happy-path-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
id: run-minikube
uses: che-incubator/setup-minikube-action@next
with:
minikube-version: v1.20.0
minikube-version: v1.21.0
- name: Deploy Eclipse Che
id: deploy-che
uses: che-incubator/che-deploy-action@next
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
echo "{\"text\":\":white_check_mark: Che Theia ${{ github.event.inputs.version }} has been released: https://quay.io/eclipse/che-theia-dev:${{ github.event.inputs.version }} https://quay.io/eclipse/che-theia:${{ github.event.inputs.version }} https://quay.io/eclipse/che-theia-endpoint-runtime-binary:${{ github.event.inputs.version }} https://quay.io/eclipse/che-theia-vsix-installer:${{ github.event.inputs.version }}\"}" > mattermost.json
- name: Send MM message
if: ${{ success() }} || ${{ failure() }}
uses: mattermost/action-mattermost-notify@1.0.2
uses: mattermost/action-mattermost-notify@1.1.0
env:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
MATTERMOST_CHANNEL: eclipse-che-releases
Expand Down
2 changes: 1 addition & 1 deletion build.include
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IMAGE_TAG="next"
THEIA_GITHUB_REPO="eclipse-theia/theia"
THEIA_VERSION="master"
THEIA_BRANCH="master"
THEIA_COMMIT_SHA=
THEIA_COMMIT_SHA="9648953cd6e8552b7e027558509ba77770bd8b6f"
THEIA_GIT_REFS="refs\\/heads\\/master"
THEIA_DOCKER_IMAGE_VERSION=

Expand Down
12 changes: 0 additions & 12 deletions cico_build_master.sh

This file was deleted.

12 changes: 0 additions & 12 deletions cico_build_nightly.sh

This file was deleted.

12 changes: 0 additions & 12 deletions cico_build_pr.sh

This file was deleted.

81 changes: 0 additions & 81 deletions cico_common.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ RUN apk add --update --no-cache \
# synchronization tool
rsync \
# patch (required in che-theia to apply patches)
patch
patch \
# requirements to run theia with yarn start
libsecret
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-12
FROM registry.access.redhat.com/ubi8/nodejs-12:1-87
FROM registry.access.redhat.com/ubi8/nodejs-12:1-90
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
USER root
# Install libsecret-devel on s390x and ppc64le for keytar build (binary included in npm package for x86)
RUN yum install -y curl make cmake gcc gcc-c++ python2 git git-core-doc openssh less bash tar gzip rsync patch \
&& { [ $(uname -m) == "s390x" ] && yum install -y \
https://rpmfind.net/linux/fedora-secondary/releases/34/Everything/s390x/os/Packages/l/libsecret-0.20.4-2.fc34.s390x.rpm \
https://rpmfind.net/linux/fedora-secondary/development/rawhide/Everything/s390x/os/Packages/l/libsecret-devel-0.20.4-2.fc34.s390x.rpm || true; } \
&& { [ $(uname -m) == "ppc64le" ] && yum install -y libsecret https://rpmfind.net/linux/centos/8-stream/BaseOS/ppc64le/os/Packages/libsecret-devel-0.18.6-1.el8.ppc64le.rpm || true; } \
&& { [ $(uname -m) == "x86_64" ] && yum install -y libsecret || true; } \
&& yum -y clean all && rm -rf /var/cache/yum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal
FROM registry.access.redhat.com/ubi8-minimal:8.4-200 as runtime
FROM registry.access.redhat.com/ubi8-minimal:8.4-205.1626828526 as runtime
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal
FROM registry.access.redhat.com/ubi8-minimal:8.4-200 as runtime
FROM registry.access.redhat.com/ubi8-minimal:8.4-205.1626828526 as runtime
11 changes: 11 additions & 0 deletions dockerfiles/theia-vsix-installer/src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ for container in $(echo "$WORKSPACE" | sed -e 's|[[,]\({"attributes":{"app.kuber
mkdir -p "$dest"
unset IFS
for url in $(echo "$urls" | sed 's/[",]/ /g' - ); do
# check if URL starts with relative:extension/
# example of url: "relative:extension/resources/download_jboss_org/jbosstools/static/jdt_ls/stable/java-0.75.0-60.vsix
if [[ "$url" =~ ^relative:extension/.* ]]; then
# if there is no CHE_PLUGIN_REGISTRY_URL env var, skip
if [ -z "${CHE_PLUGIN_REGISTRY_URL}" ]; then
echo "CHE_PLUGIN_REGISTRY_URL env var is not set, skipping relative url ${url}"
continue
fi
# update URL by using the Plugin Registry URL as prefix
url=${CHE_PLUGIN_REGISTRY_URL}/${url#relative:extension/}
fi
echo; echo "downloading $urls to $dest"
curl -L "$url" > "$dest/$(basename "$url")"
done
Expand Down
5 changes: 2 additions & 3 deletions dockerfiles/theia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ CI generates several tags of [docker images](https://quay.io/repository/eclipse/
- `eclipse/che-theia:next`
- theia branch: [master](https://github.com/theia-ide/theia/)
- che-theia branch: [main](https://github.com/eclipse-che/che-theia)
- CI [build job](https://ci.centos.org/view/Devtools/job/devtools-che-theia-che-build-master/)
- CI [nightly build job](https://ci.centos.org/view/Devtools/job/devtools-che-theia-che-nightly/)
- CI [next build job](https://github.com/eclipse-che/che-theia/actions/workflows/build-publish-next.yml)

- `eclipse/che-theia:latest` the latest stable Che-Theia 7.x release, updates on each release by CI [release job](https://ci.centos.org/view/Devtools/job/devtools-che-theia-che-release/)
- `eclipse/che-theia:latest` the latest stable Che-Theia 7.x release, updates on each release by CI [release job](https://github.com/eclipse-che/che-theia/actions/workflows/release.yml)

## Theia version

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/theia/docker/ubi8/build-result-from.dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-12
FROM registry.access.redhat.com/ubi8/nodejs-12:1-87 as build-result
FROM registry.access.redhat.com/ubi8/nodejs-12:1-90 as build-result
USER root
2 changes: 1 addition & 1 deletion dockerfiles/theia/docker/ubi8/runtime-from.dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8/nodejs-12
FROM registry.access.redhat.com/ubi8/nodejs-12:1-87 as runtime
FROM registry.access.redhat.com/ubi8/nodejs-12:1-90 as runtime
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# need root user
USER root

ARG SSHPASS_VERSION="1.06"
ARG SSHPASS_VERSION="1.08"

# Install sudo
# Install git
Expand All @@ -12,7 +12,13 @@ ARG SSHPASS_VERSION="1.06"
# Install less for handling git diff properly
# Install sshpass for handling passwords for SSH keys
# Install libsecret as Theia requires it
RUN yum install -y sudo git bzip2 which bash curl openssh less libsecret && \
curl -ssl https://netcologne.dl.sourceforge.net/project/sshpass/sshpass/"${SSHPASS_VERSION}"/sshpass-"${SSHPASS_VERSION}".tar.gz -o sshpass.tar.gz && \
tar -xvf sshpass.tar.gz && cd sshpass-"${SSHPASS_VERSION}" && ./configure && make install && cd .. && rm -rf sshpass-"${SSHPASS_VERSION}" && \
yum -y clean all && rm -rf /var/cache/yum
# Install libsecret-devel on s390x and ppc64le for keytar build (binary included in npm package for x86)
RUN yum install -y sudo git bzip2 which bash curl openssh less \
&& { [ $(uname -m) == "s390x" ] && yum install -y \
https://rpmfind.net/linux/fedora-secondary/releases/34/Everything/s390x/os/Packages/l/libsecret-0.20.4-2.fc34.s390x.rpm \
https://rpmfind.net/linux/fedora-secondary/development/rawhide/Everything/s390x/os/Packages/l/libsecret-devel-0.20.4-2.fc34.s390x.rpm || true; } \
&& { [ $(uname -m) == "ppc64le" ] && yum install -y libsecret https://rpmfind.net/linux/centos/8-stream/BaseOS/ppc64le/os/Packages/libsecret-devel-0.18.6-1.el8.ppc64le.rpm || true; } \
&& { [ $(uname -m) == "x86_64" ] && yum install -y libsecret || true; } \
&& curl -sSLo sshpass.tar.gz https://downloads.sourceforge.net/project/sshpass/sshpass/"${SSHPASS_VERSION}"/sshpass-"${SSHPASS_VERSION}".tar.gz \
&& tar -xvf sshpass.tar.gz && cd sshpass-"${SSHPASS_VERSION}" && ./configure && make install && cd .. && rm -rf sshpass-"${SSHPASS_VERSION}" \
&& yum -y clean all && rm -rf /var/cache/yum
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ export class CheMiniBrowserEnvironment extends MiniBrowserEnvironment {

this._hostPatternPromise = Promise.resolve(miniBrowserHostName);
}

get hostPatternPromise(): Promise<string> {
return this.environment
.getValue(MiniBrowserEndpoint.HOST_PATTERN_ENV)
.then(envVar => envVar?.value || MiniBrowserEndpoint.HOST_PATTERN_DEFAULT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export class CheWebviewEnvironment extends WebviewEnvironment {
return new URI(host).resolve('webview');
}

get hostPatternPromise(): Promise<string> {
return this.environments
.getValue(WebviewExternalEndpoint.pattern)
.then(variable => variable?.value || WebviewExternalEndpoint.defaultPattern);
}

protected async getWebviewCheEndpoint(): Promise<string | undefined> {
const webviewCheEndpoints = await this.endpointService.getEndpointsByType(SERVER_WEBVIEWS_ATTR_VALUE);
if (webviewCheEndpoints.length === 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,111 @@

import * as React from 'react';

import { injectable } from 'inversify';
import { Devfile, DevfileService } from '@eclipse-che/theia-remote-api/lib/common/devfile-service';

import { FileNavigatorWidget } from '@theia/navigator/lib/browser/navigator-widget';
import { FileService } from '@theia/filesystem/lib/browser/file-service';
import URI from '@theia/core/lib/common/uri';
import { WorkspaceInputDialog } from '@theia/workspace/lib/browser/workspace-input-dialog';
import { WorkspaceService } from '@eclipse-che/theia-remote-api/lib/common/workspace-service';
import { inject } from '@theia/core/shared/inversify';
import { injectable } from 'inversify';

@injectable()
export class CheFileNavigatorWidget extends FileNavigatorWidget {
@inject(FileService) protected readonly fileService: FileService;
@inject(DevfileService) protected readonly devfileService: DevfileService;
@inject(WorkspaceService) protected readonly cheWorkspaceService: WorkspaceService;

protected devfile: Devfile | undefined;
protected projectsRootDirectory: string | undefined;

protected renderEmptyMultiRootWorkspace(): React.ReactNode {
if (this.devfile) {
const projects = this.devfile.projects;
if (projects && projects.length > 0) {
return this.renderNoProjectsPanel();
} else {
return this.renderWelcomePanel();
}
} else {
this.initialize().then(() => this.restartRendering());

return this.renderNoProjectsPanel();
}
}

protected renderNoProjectsPanel(): React.ReactNode {
return (
<div className="theia-navigator-container">
<div className="center">No projects in the workspace yet</div>
</div>
);
}

protected renderWelcomePanel(): React.ReactNode {
return (
<div className="theia-navigator-container">
<div className="label">No projects in the workspace yet.</div>
<div className="label">You can clone a repository from a URL.</div>
<div className="open-workspace-button-container">
<button
className="theia-button open-workspace-button"
title="Clone Repository"
onClick={this.cloneRepo}
onKeyUp={this.keyUpHandler}
>
Clone Repository
</button>
</div>
<div className="label">You can also add a new folder to the Che workspace.</div>
<div className="open-workspace-button-container">
<button
className="theia-button open-workspace-button"
title="Add a new folder to your workspace"
onClick={this.newFolderToWorkspace}
onKeyUp={this.keyUpHandler}
>
New Folder
</button>
</div>
</div>
);
}

protected newFolderToWorkspace = () => {
const parent = new URI(this.projectsRootDirectory);
const dialog = new WorkspaceInputDialog(
{
title: 'New Folder',
parentUri: new URI(this.projectsRootDirectory),
initialValue: 'Untitled',
},
this.labelProvider
);
dialog.open().then(async name => {
if (name) {
const folderUri = parent.resolve(name);
await this.fileService.createFolder(folderUri);
}
});
};

protected cloneRepo = () => {
return this.commandService.executeCommand('git.clone');
};

protected async initialize(): Promise<void> {
if (!this.devfile) {
this.devfile = await this.devfileService.get();
}

if (!this.projectsRootDirectory) {
this.projectsRootDirectory = (await this.cheWorkspaceService.getProjectsRootDirectory()) || '/projects';
}
}

private async restartRendering(): Promise<void> {
super.render();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*
* SPDX-License-Identifier: EPL-2.0
***********************************************************************/

import '../../src/browser/style/index.css';

import { CommandContribution, MenuContribution } from '@theia/core/lib/common';
import { Container, ContainerModule, interfaces } from 'inversify';
import { FileTree, FileTreeModel, FileTreeWidget, createFileTreeContainer } from '@theia/filesystem/lib/browser';
Expand Down
Loading

0 comments on commit abc40e7

Please sign in to comment.