This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into quick_pick_items_ext
- Loading branch information
Showing
16 changed files
with
416 additions
and
38 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,15 @@ | ||
# Copyright (c) 2019 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Red Hat, Inc. - initial API and implementation | ||
FROM ${BUILD_ORGANIZATION}/che-remote-plugin-kubernetes-tooling-1.0.0:${BUILD_TAG} | ||
|
||
ENV KAMEL_VERSION 1.0.0-M3 | ||
|
||
RUN curl -L https://github.com/apache/camel-k/releases/download/${KAMEL_VERSION}/camel-k-client-${KAMEL_VERSION}-linux-64bit.tar.gz | tar -C /usr/local/bin -xz \ | ||
&& chmod +x /usr/local/bin/kamel |
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,15 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2019 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
|
||
base_dir=$(cd "$(dirname "$0")"; pwd) | ||
. "${base_dir}"/../build.include | ||
|
||
init --name:remote-plugin-camelk-0.0.10 "$@" | ||
build |
47 changes: 47 additions & 0 deletions
47
dockerfiles/remote-plugin-openshift-connector-0.1.1/Dockerfile
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,47 @@ | ||
# Copyright (c) 2019 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Red Hat, Inc. - initial API and implementation | ||
|
||
FROM alpine:3.10.2 | ||
|
||
ENV HOME=/home/theia | ||
|
||
RUN mkdir /projects ${HOME} && \ | ||
# Change permissions to let any arbitrary user | ||
for f in "${HOME}" "/etc/passwd" "/projects"; do \ | ||
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \ | ||
chmod -R g+rwX ${f}; \ | ||
done | ||
|
||
ENV GLIBC_VERSION=2.30-r0 \ | ||
ODO_VERSION=v1.0.0 \ | ||
OC_VERSION=v3.11.0 \ | ||
OC_TAG=0cbc58b \ | ||
KUBECTL_VERSION=v1.16.2 | ||
|
||
# plugin executes the commands relying on Bash | ||
RUN apk add --update --no-cache bash && \ | ||
# install glibc compatibility layer package for Alpine Linux | ||
# see https://github.com/openshift/origin/issues/18942 for the details | ||
wget -O glibc-${GLIBC_VERSION}.apk https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk && \ | ||
apk --update --allow-untrusted add glibc-${GLIBC_VERSION}.apk && \ | ||
rm -f glibc-${GLIBC_VERSION}.apk && \ | ||
# install oc | ||
wget -O- https://github.com/openshift/origin/releases/download/${OC_VERSION}/openshift-origin-client-tools-${OC_VERSION}-${OC_TAG}-linux-64bit.tar.gz | tar xvz -C /usr/local/bin --strip 1 && \ | ||
# install odo | ||
wget -O /usr/local/bin/odo https://mirror.openshift.com/pub/openshift-v4/clients/odo/${ODO_VERSION}/odo-linux-amd64 && \ | ||
chmod +x /usr/local/bin/odo && \ | ||
# install kubectl | ||
wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl && \ | ||
chmod +x /usr/local/bin/kubectl | ||
|
||
ADD etc/entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE} |
15 changes: 15 additions & 0 deletions
15
dockerfiles/remote-plugin-openshift-connector-0.1.1/build.sh
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,15 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) 2019 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
|
||
base_dir=$(cd "$(dirname "$0")"; pwd) | ||
. "${base_dir}"/../build.include | ||
|
||
init --name:remote-plugin-openshift-connector-0.1.1 "$@" | ||
build |
28 changes: 28 additions & 0 deletions
28
dockerfiles/remote-plugin-openshift-connector-0.1.1/etc/entrypoint.sh
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,28 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2018-2018 Red Hat, Inc. | ||
# This program and the accompanying materials are made | ||
# available under the terms of the Eclipse Public License 2.0 | ||
# which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Red Hat, Inc. - initial API and implementation | ||
# | ||
|
||
set -e | ||
|
||
export USER_ID=$(id -u) | ||
export GROUP_ID=$(id -g) | ||
|
||
if ! whoami >/dev/null 2>&1; then | ||
echo "${USER_NAME:-user}:x:${USER_ID}:0:${USER_NAME:-user} user:${HOME}:/bin/sh" >> /etc/passwd | ||
fi | ||
|
||
# Grant access to projects volume in case of non root user with sudo rights | ||
if [ "${USER_ID}" -ne 0 ] && command -v sudo >/dev/null 2>&1 && sudo -n true > /dev/null 2>&1; then | ||
sudo chown "${USER_ID}:${GROUP_ID}" /projects | ||
fi | ||
|
||
exec "$@" |
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
19 changes: 19 additions & 0 deletions
19
extensions/eclipse-che-theia-plugin-ext/src/browser/che-mini-browser-open-handler.ts
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,19 @@ | ||
/********************************************************************* | ||
* Copyright (c) 2019 Red Hat, Inc. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
|
||
import { MiniBrowserOpenerOptions, MiniBrowserOpenHandler } from '@theia/mini-browser/lib/browser/mini-browser-open-handler'; | ||
|
||
export class CheMiniBrowserOpenHandler extends MiniBrowserOpenHandler { | ||
|
||
protected async getOpenPreviewProps(startPage: string): Promise<MiniBrowserOpenerOptions> { | ||
const miniBrowserOpenerOptions = await super.getOpenPreviewProps(startPage); | ||
return { ...miniBrowserOpenerOptions, toolbar: 'show' }; | ||
} | ||
} |
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
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
Oops, something went wrong.