-
Notifications
You must be signed in to change notification settings - Fork 11
/
devfile-v1.yaml
76 lines (76 loc) · 2.38 KB
/
devfile-v1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
apiVersion: 1.0.0
metadata:
name: spring-music
projects:
- name: summit-lab-spring-music
source:
type: git
location: 'https://github.com/edeandrea/summit-lab-spring-music.git'
branch: pipeline
components:
- id: redhat/dependency-analytics/latest
type: chePlugin
- id: redhat/java11/latest
type: chePlugin
- id: redhat/vscode-yaml/latest
type: chePlugin
- id: redhat/vscode-xml/latest
type: chePlugin
- mountSources: true
endpoints:
- name: spring-music
port: 8080
memoryLimit: 2048Mi
type: dockerimage
volumes:
- name: m2
containerPath: /home/jboss/.m2
alias: spring-music
image: 'registry.redhat.io/codeready-workspaces/plugin-java11-rhel8:2.5'
commands:
- name: Build
actions:
- type: exec
workdir: '/${CHE_PROJECTS_ROOT}/summit-lab-spring-music'
command: ./mvnw clean install
component: spring-music
- name: Run application locally
actions:
- type: exec
workdir: '/${CHE_PROJECTS_ROOT}/summit-lab-spring-music'
command: ./mvnw clean spring-boot:run -DskipTests
component: spring-music
- name: Run application locally (debug)
actions:
- type: exec
component: spring-music
command: ./mvnw clean spring-boot:run -DskipTests -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
workdir: '${CHE_PROJECTS_ROOT}/summit-lab-spring-music'
- name: Dependency analysis
actions:
- type: exec
workdir: '${CHE_PROJECTS_ROOT}/summit-lab-spring-music'
component: spring-music
command: '${HOME}/stack-analysis.sh -f ${CHE_PROJECTS_ROOT}/summit-lab-spring-music/pom.xml -p ${CHE_PROJECTS_ROOT}/summit-lab-spring-music'
- name: Deploy to OpenShift
actions:
- type: exec
workdir: '/${CHE_PROJECTS_ROOT}/summit-lab-spring-music'
command: ./mvnw clean oc:deploy -Popenshift -DskipTests
component: spring-music
- name: Remote debug
actions:
- type: vscode-launch
referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"request": "attach",
"name": "Attach to Remote App",
"hostName": "localhost",
"port": 5005
}
]
}