Created
October 21, 2020 11:59
-
-
Save blues-man/e81ef4e2954cd22a75f8e2e952469b92 to your computer and use it in GitHub Desktop.
nationalparks-devfile.yaml
This file contains hidden or 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
metadata: | |
name: spring-boot-nationalparks- | |
projects: | |
- name: spring-boot-nationalparks | |
source: | |
location: 'https://github.com/openshift-roadshow/nationalparks.git' | |
type: git | |
components: | |
- id: redhat/java8/latest | |
type: chePlugin | |
- id: redhat/dependency-analytics/latest | |
type: chePlugin | |
- mountSources: true | |
endpoints: | |
- name: 8080-tcp | |
port: 8080 | |
memoryLimit: 768Mi | |
type: dockerimage | |
volumes: | |
- name: m2 | |
containerPath: /home/jboss/.m2 | |
image: >- | |
registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:d04f70c8340abaee1a282b77158d054f4faf2225bc17c79aafb413396c367782 | |
alias: maven | |
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 | |
apiVersion: 1.0.0 | |
commands: | |
- name: 1. Build | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster' | |
type: exec | |
command: >- | |
MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests clean | |
install | |
component: maven | |
- name: 2. Run | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster' | |
type: exec | |
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} spring-boot:run' | |
component: maven | |
- name: 3. Run in debug mode | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster' | |
type: exec | |
command: >- | |
mvn -Duser.home=${HOME} spring-boot:run | |
-Dspring-boot.run.jvmArguments="-Xdebug | |
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" | |
component: maven | |
- name: 4. Run tests | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster' | |
type: exec | |
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} verify' | |
component: maven | |
- name: 5. Log into deployment cluster | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster' | |
type: exec | |
command: | | |
echo | |
echo "Before you can deploy this application to an openshift cluster," | |
echo "you must run 'oc login ...' in the maven terminal." | |
echo | |
component: maven | |
- name: 6. Deploy to OpenShift | |
actions: | |
- workdir: '${CHE_PROJECTS_ROOT}/spring-boot-http-booster' | |
type: exec | |
command: 'mvn fabric8:deploy -Popenshift -DskipTests' | |
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": 5005 | |
}] | |
} | |
type: vscode-launch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment