Skip to content

Commit 8b72c75

Browse files
ibuziukmaxandersen
authored andcommitted
Adding devfile and 'Developer Workspace' button in readme for trying the project on Hosted Che / che.openshift.io
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
1 parent 0ca9094 commit 8b72c75

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

devfile.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
apiVersion: 1.0.0
3+
metadata:
4+
name: jbang
5+
components:
6+
-
7+
type: chePlugin
8+
id: redhat/java/latest
9+
-
10+
type: dockerimage
11+
alias: gradle
12+
image: quay.io/eclipse/che-java11-gradle:nightly
13+
env:
14+
- name: GRADLE_USER_HOME
15+
value: /home/gradle/.gradle
16+
- name: JAVA_OPTS
17+
value: "-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
18+
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
19+
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom"
20+
- name: JAVA_TOOL_OPTIONS
21+
value: "-XX:MaxRAMPercentage=50 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
22+
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
23+
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom"
24+
- name: HOME
25+
value: /home/gradle
26+
memoryLimit: 512Mi
27+
volumes:
28+
- name: gradle
29+
containerPath: /home/gradle/.gradle
30+
mountSources: true
31+
commands:
32+
-
33+
name: build
34+
actions:
35+
-
36+
type: exec
37+
component: gradle
38+
command: "./gradlew"
39+
workdir: ${CHE_PROJECTS_ROOT}/jbang
40+

readme.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ hello made with jbang
3737

3838
Instant cli app generated built using java and picocli as a dependency that was fetched as needed for the compilation and execution.
3939

40+
== Try it online on Hosted Che at https://che.openshift.io[che.openshift.io]
41+
42+
image:https://che.openshift.io/factory/resources/factory-contribute.svg[Contribute, link=https://che.openshift.io/f?url=https://github.com/maxandersen/jbang]
43+
4044
== Features
4145

4246
* `.java` Scripting for Java 8 and upwards

0 commit comments

Comments
 (0)