-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement agreed-on devfile 2.0 issues (#35)
* Implement agreement on issue #18 * Implement agreement on issue #17 * Implement agreement on issue #21 * Implement agreement on issue #22 * Implement agreement on issue #27 * Implement agreement on issue #9 * Implement agreement on issue #10 * Fix PR comments about issue #9 PR comment #35 (comment) * Fix PR comments about issue #17 PR comment #35 (comment) * Implement agreement on issue #14 and #19 * Add the spring boot example * Implement agreement on issue #32 * Fix last PR comments Signed-off-by: David Festal <dfestal@redhat.com> Co-Authored-By: Sergii Leshchenko <sleshche@redhat.com>
- Loading branch information
1 parent
e023a38
commit f9e7352
Showing
29 changed files
with
2,117 additions
and
287 deletions.
There are no files selected for viewing
276 changes: 247 additions & 29 deletions
276
deploy/crds/workspaces.ecd.eclipse.org_devworkspaces_crd.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
272 changes: 244 additions & 28 deletions
272
deploy/crds/workspaces.ecd.eclipse.org_devworkspacetemplates_crd.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
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
99 changes: 99 additions & 0 deletions
99
devfile-support/samples/spring-boot-http-booster-devfile.yaml
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,99 @@ | ||
schemaVersion: 2.0.0 | ||
metadata: | ||
name: spring-boot-http-booster | ||
projects: | ||
- name: spring-boot-http-booster | ||
git: | ||
location: https://github.com/snowdrop/spring-boot-http-booster | ||
branch: master | ||
components: | ||
- chePlugin: | ||
registryEntry: | ||
id: redhat/java8/latest | ||
- chePlugin: | ||
registryEntry: | ||
id: redhat/dependency-analytics/latest | ||
- container: | ||
name: maven | ||
image: registry.redhat.io/codeready-workspaces/stacks-java-rhel8:2.1 | ||
mountSources: true | ||
memoryLimit: 768Mi | ||
env: | ||
- name: JAVA_OPTS | ||
value: >- | ||
-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 | ||
-XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true | ||
-Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/jboss | ||
- name: MAVEN_OPTS | ||
value: $(JAVA_OPTS) | ||
endpoints: | ||
- name: 8080-tcp | ||
targetPort: 8080 | ||
configuration: | ||
public: true | ||
volumeMounts: | ||
- name: m2 | ||
path: /home/jboss/.m2 | ||
- volume: | ||
name: m2 | ||
size: 2G | ||
commands: | ||
- exec: | ||
id: build | ||
component: maven | ||
commandLine: mvn -Duser.home=${HOME} -DskipTests clean install | ||
workingDir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
env: | ||
- name: MAVEN_OPTS | ||
value: "-Xmx200m" | ||
- vscodeLaunch: | ||
id: debug remote java application | ||
inlined: | | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "Debug (Attach) - Remote", | ||
"request": "attach", | ||
"hostName": "localhost", | ||
"port": 8000 | ||
}] | ||
} | ||
- exec: | ||
id: run | ||
component: maven | ||
commandLine: 'mvn -Duser.home=${HOME} spring-boot:run' | ||
workingDir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
env: | ||
- name: MAVEN_OPTS | ||
value: "-Xmx200m" | ||
- exec: | ||
id: debug | ||
component: maven | ||
commandLine: >- | ||
mvn -Duser.home=${HOME} spring-boot:run -Drun.jvmArguments="-Xdebug | ||
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" | ||
workingDir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
- exec: | ||
id: test | ||
component: maven | ||
commandLine: 'mvn -Duser.home=${HOME} verify' | ||
workingDir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
env: | ||
- name: MAVEN_OPTS | ||
value: "-Xmx200m" | ||
- exec: | ||
id: dependency-analysis | ||
component: maven | ||
workingDir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
commandLine: >- | ||
${HOME}/stack-analysis.sh -f | ||
${PROJECTS_ROOT}/spring-boot-http-booster/pom.xml -p | ||
${PROJECTS_ROOT}/spring-boot-http-booster | ||
- exec: | ||
id: deploy to OpenShift | ||
component: maven | ||
commandLine: 'mvn fabric8:deploy -Popenshift -DskipTests' | ||
workingDir: '${PROJECTS_ROOT}/spring-boot-http-booster' |
93 changes: 93 additions & 0 deletions
93
devfile-support/samples/spring-boot-http-booster-devfile.yaml.devfile-1.0.yaml
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,93 @@ | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: spring-boot-http-booster | ||
projects: | ||
- name: spring-boot-http-booster | ||
source: | ||
location: 'https://github.com/snowdrop/spring-boot-http-booster' | ||
type: git | ||
branch: master | ||
components: | ||
- id: redhat/java8/latest | ||
type: chePlugin | ||
- id: redhat/dependency-analytics/latest | ||
type: chePlugin | ||
- type: dockerimage | ||
alias: maven | ||
image: registry.redhat.io/codeready-workspaces/stacks-java-rhel8:2.1 | ||
mountSources: true | ||
memoryLimit: 768Mi | ||
env: | ||
- value: >- | ||
-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 | ||
-XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true | ||
-Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/jboss | ||
name: JAVA_OPTS | ||
- value: $(JAVA_OPTS) | ||
name: MAVEN_OPTS | ||
endpoints: | ||
- name: 8080-tcp | ||
port: 8080 | ||
volumes: | ||
- name: m2 | ||
containerPath: /home/jboss/.m2 | ||
commands: | ||
- name: build | ||
actions: | ||
- workdir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
type: exec | ||
command: >- | ||
MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests clean | ||
install | ||
component: maven | ||
- name: Debug remote java application | ||
actions: | ||
- referenceContent: | | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "java", | ||
"name": "Debug (Attach) - Remote", | ||
"request": "attach", | ||
"hostName": "localhost", | ||
"port": 8000 | ||
}] | ||
} | ||
type: vscode-launch | ||
- name: run | ||
actions: | ||
- workdir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
type: exec | ||
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} spring-boot:run' | ||
component: maven | ||
- name: debug | ||
actions: | ||
- workdir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
type: exec | ||
command: >- | ||
mvn -Duser.home=${HOME} spring-boot:run -Drun.jvmArguments="-Xdebug | ||
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" | ||
component: maven | ||
- name: test | ||
actions: | ||
- workdir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
type: exec | ||
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} verify' | ||
component: maven | ||
- name: dependency-analysis | ||
actions: | ||
- workdir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
type: exec | ||
command: >- | ||
${HOME}/stack-analysis.sh -f | ||
${PROJECTS_ROOT}/spring-boot-http-booster/pom.xml -p | ||
${PROJECTS_ROOT}/spring-boot-http-booster | ||
component: maven | ||
- name: deploy to OpenShift | ||
actions: | ||
- workdir: '${PROJECTS_ROOT}/spring-boot-http-booster' | ||
type: exec | ||
command: 'mvn fabric8:deploy -Popenshift -DskipTests' | ||
component: maven |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
name: with-parent | ||
schemaVersion: 2.0.0 | ||
metadata: | ||
name: with-parent | ||
parent: | ||
uri: https://raw.githubusercontent.com/che-incubator/devworkspace-api/proposal-25-variant-1-define-stacks/devfile-support/samples/nodejs-stack.devfile.yaml | ||
commands: | ||
- exec: | ||
id: sayHello | ||
label: Say Hello | ||
commandLine: echo "hello" | ||
component: nodejs |
17 changes: 17 additions & 0 deletions
17
devfile-support/transformation-rules/add-name-and-version-metadata.json
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,17 @@ | ||
[ | ||
{ | ||
"op": "add", | ||
"path": "/properties/metadata", | ||
"value": { "type": "object", "description": "Optional metadata", "properties": {} } | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/properties/metadata/properties/version", | ||
"value": { "type": "string", "description": "Optional semver-compatible version", "pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(\\-[0-9a-z-]+(\\.[0-9a-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" } | ||
}, | ||
{ | ||
"op": "add", | ||
"path": "/properties/metadata/properties/name", | ||
"value": { "type": "string", "description": "Optional devfile name" } | ||
} | ||
] |
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.