This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 115
chore: Export git repositories as zip files for Devfile v2 #532
Conversation
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
vinokurig
requested review from
JPinkney,
tsmaeder and
vitaliy-guliy
as code owners
December 2, 2021 16:21
1 similar comment
depends on eclipse-che/che#20877 |
1 similar comment
svor
reviewed
Dec 8, 2021
svor
approved these changes
Dec 8, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just one comment, see above.
Generated DevWorkspace for cpp
apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspaceTemplate
metadata:
name: theia-ide-cpp
spec:
commands:
- id: init-container-command
apply:
component: remote-runtime-injector
events:
preStart:
- init-container-command
components:
- name: theia-ide
container:
image: >-
quay.io/eclipse/che-theia@sha256:73588f8d6b5078726e90b48e06f10594758c93532339dc1ec48192e7faa2fc71
env:
- name: THEIA_PLUGINS
value: local-dir:///plugins
- name: HOSTED_PLUGIN_HOSTNAME
value: 0.0.0.0
- name: HOSTED_PLUGIN_PORT
value: '3130'
- name: THEIA_HOST
value: 127.0.0.1
volumeMounts:
- name: plugins
path: /plugins
- name: theia-local
path: /home/theia/.theia
mountSources: true
memoryLimit: 512M
cpuLimit: 1500m
cpuRequest: 100m
endpoints:
- name: theia
attributes:
type: main
cookiesAuthEnabled: true
discoverable: false
urlRewriteSupported: true
targetPort: 3100
exposure: public
secure: false
protocol: https
- name: webviews
attributes:
type: webview
cookiesAuthEnabled: true
discoverable: false
unique: true
urlRewriteSupported: true
targetPort: 3100
exposure: public
secure: false
protocol: https
- name: mini-browser
attributes:
type: mini-browser
cookiesAuthEnabled: true
discoverable: false
unique: true
urlRewriteSupported: true
targetPort: 3100
exposure: public
secure: false
protocol: https
- name: theia-dev
attributes:
type: ide-dev
discoverable: false
urlRewriteSupported: true
targetPort: 3130
exposure: public
protocol: http
- name: theia-redirect-1
attributes:
discoverable: false
urlRewriteSupported: true
targetPort: 13131
exposure: public
protocol: http
- name: theia-redirect-2
attributes:
discoverable: false
urlRewriteSupported: true
targetPort: 13132
exposure: public
protocol: http
- name: theia-redirect-3
attributes:
discoverable: false
urlRewriteSupported: true
targetPort: 13133
exposure: public
protocol: http
- name: terminal
attributes:
type: collocated-terminal
discoverable: false
cookiesAuthEnabled: true
urlRewriteSupported: true
targetPort: 3333
exposure: public
secure: false
protocol: wss
attributes:
app.kubernetes.io/component: che-theia
app.kubernetes.io/part-of: che-theia.eclipse.org
- name: plugins
volume: {}
- name: theia-local
volume: {}
- name: che-machine-exec
container:
image: >-
quay.io/eclipse/che-machine-exec@sha256:2e244dd5b3ed0baf00570a21a904b4066a35b1618a0a0fb0aa02e345c4faeeeb
command:
- /go/bin/che-machine-exec
- '--url'
- 127.0.0.1:3333
attributes:
app.kubernetes.io/component: machine-exec
app.kubernetes.io/part-of: che-theia.eclipse.org
- name: remote-runtime-injector
container:
image: >-
quay.io/eclipse/che-theia-endpoint-runtime-binary@sha256:d4327b40cb3aae5d59f618c0fe5903683ea4fe5a412f4d421f787c77eaf94315
env:
- name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
value: /remote-endpoint/plugin-remote-endpoint
- name: REMOTE_ENDPOINT_VOLUME_NAME
value: remote-endpoint
volumeMounts:
- name: plugins
path: /plugins
- name: remote-endpoint
path: /remote-endpoint
attributes:
app.kubernetes.io/component: remote-runtime-injector
app.kubernetes.io/part-of: che-theia.eclipse.org
- name: remote-endpoint
volume:
ephemeral: true
projects:
- name: cpp-hello-world
zip:
location: '{{ DEVFILE_REGISTRY_URL }}/resources/v2/cpp-hello-world.zip'
---
apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
name: cpp
spec:
started: true
template:
attributes:
che-theia.eclipse.org/sidecar-policy: USE_DEV_CONTAINER
components:
- name: cpp-dev
container:
image: quay.io/devfile/universal-developer-image:ubi8-1e8c2c9
memoryLimit: 1G
mountSources: true
env:
- name: PLUGIN_REMOTE_ENDPOINT_EXECUTABLE
value: /remote-endpoint/plugin-remote-endpoint
- name: THEIA_PLUGINS
value: local-dir:///plugins/sidecars/cpp-dev
volumeMounts:
- path: /remote-endpoint
name: remote-endpoint
- path: /plugins
name: plugins
args:
- sh
- '-c'
- ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
attributes:
che-theia.eclipse.org/vscode-extensions:
- >-
https://download.jboss.org/jbosstools/vscode/3rdparty/cdt-vscode/cdt-vscode-0.0.7-75cf95.vsix
- >-
https://download.jboss.org/jbosstools/vscode/3rdparty/cdt-gdb-vscode/cdt-gdb-vscode-0.0.91-2cbbb8.vsix
- >-
https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-clangd/vscode-clangd-0.1.5-562d00.vsix
app.kubernetes.io/name: cpp-dev
- name: theia-ide-cpp
plugin:
kubernetes:
name: theia-ide-cpp
commands:
- id: build
exec:
label: Build application
component: cpp-dev
workingDir: ${PROJECTS_ROOT}/cpp-hello-world
commandLine: g++ -g hello.cpp -o hello.out && echo "Build complete"
group:
kind: build
isDefault: true
- id: run
exec:
label: Run application
component: cpp-dev
workingDir: ${PROJECTS_ROOT}/cpp-hello-world
commandLine: ./hello.out
group:
kind: run
9 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Igor Vinokur ivinokur@redhat.com
What does this PR do?
v2
linkScreenshot/screencast of this PR
What issues does this PR fix or reference?
eclipse-che/che#20720
How to test this PR?
./build.sh
to build an image.docker run -it --rm -p 8080:8080 quay.io/eclipse/che-devfile-registry:next
./resources/v2
folder is present and contains zip projects.devworkspace-che-theia-next.yaml
ordevworkspace-che-theia-latest.yaml
to contain a project section with the zip in its location.PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.