forked from snowdrop/rest-http-example
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdevfile.yaml
76 lines (76 loc) · 2.05 KB
/
devfile.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
schemaVersion: 2.1.0
metadata:
name: spring-boot-http-booster
components:
- name: tools
container:
image: registry.redhat.io/devspaces/udi-rhel8:3.4
env:
- name: USE_JAVA8
value: "true"
memoryLimit: 3Gi
endpoints:
- exposure: public
name: http-booster
protocol: http
targetPort: 8080
- exposure: internal
name: debug
protocol: http
targetPort: 5005
volumeMounts:
- name: m2
path: /home/user/.m2
- name: m2
volume:
size: 1G
commands:
- id: 1-build
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/rest-http-example
commandLine: mvn -DskipTests clean install
group:
kind: build
- id: 2-run
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/rest-http-example
commandLine: mvn spring-boot:run
group:
kind: run
- id: 3-run-in-debug
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/rest-http-example
commandLine: >-
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
group:
kind: run
- id: 4-run-tests
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/rest-http-example
commandLine: mvn verify
group:
kind: test
- id: 5-log-into-cluster
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/rest-http-example
commandLine: |
echo
echo "You are already logged in to the current cluster. However, if you want"
echo "to deploy this application to a different OpenShift cluster, you must"
echo "run 'oc login ...' in the tools terminal."
echo
group:
kind: run
- id: 6-deploy-to-openshift
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/rest-http-example
commandLine: oc project $DEVWORKSPACE_NAMESPACE && mvn fabric8:deploy -Popenshift -DskipTests
group:
kind: run