-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevfile.yaml
More file actions
111 lines (111 loc) · 3.62 KB
/
devfile.yaml
File metadata and controls
111 lines (111 loc) · 3.62 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
apiVersion: 1.0.0
metadata:
name: api
projects:
- name: api
source:
location: 'https://github.com/redhat-appdev-practice/vertx-openapi-jooq-multimodule.git'
type: git
components:
- id: redhat/java11/latest
preferences:
java.server.launchMode: Standard
type: chePlugin
- id: sonarsource/sonarlint-vscode/latest
type: chePlugin
preferences:
sonarlint.connectedMode.connections.sonarcloud: >
{ "connectionId": "sonarcloud",
"organizationKey": "infosec812-github",
"token": "07c55d49dcae384ad64611a7529102b656d4118c"}
sonarlint.connectedMode.project: >
{ "projectKey": "vertx-openapi-jooq-multimodule",
"connectionId": "sonarcloud"}
- mountSources: true
endpoints:
- name: 8080-tcp
port: 8080
memoryLimit: 384Mi
type: dockerimage
volumes:
- name: m2
containerPath: /home/jboss/.m2
alias: maven
image: 'registry.redhat.io/codeready-workspaces/plugin-java11-rhel8@sha256:d0337762e71fd4badabcb38a582b2f35e7e7fc1c9c0f2e841e339d45b7bd34ed'
env:
- value: $(JAVA_OPTS)
name: MAVEN_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: JAVA_OPTS
- mountSources: true
command:
- sleep
- infinity
memoryLimit: 128Mi
type: dockerimage
alias: openapi
image: 'docker.io/openapitools/openapi-generator-cli:latest'
- mountSources: true
command:
- sleep
- infinity
memoryLimit: 128Mi
type: dockerimage
alias: 3scale
image: 'registry.redhat.io/3scale-amp2/toolbox-rhel7:1.5.0'
commands:
- name: 1. Build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/api'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTestsclean install'
component: maven
- name: 2. Run
actions:
- workdir: '${CHE_PROJECTS_ROOT}/api'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -Dvertx.disableDnsResolver=true vertx:run'
component: maven
- name: 3. Run in debug mode
actions:
- workdir: '${CHE_PROJECTS_ROOT}/api'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests vertx:debug'
component: maven
- name: 4. Run tests
actions:
- workdir: '${CHE_PROJECTS_ROOT}/api'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn -Duser.home=${HOME} -DskipTests verify '
component: maven
- name: 5. Log into deployment cluster
actions:
- workdir: '${CHE_PROJECTS_ROOT}/api'
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}/api'
type: exec
command: 'MAVEN_OPTS="-Xmx200m" && mvn oc:apply -DskipTests -Dvertx.disableDnsResolver=true'
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