-
Notifications
You must be signed in to change notification settings - Fork 525
/
devfile.yaml
232 lines (204 loc) · 7.45 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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
#
# Copyright (c) 2019 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at:
#
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
apiVersion: 1.0.0
metadata:
generateName: jkube-
components:
- type: chePlugin
id: redhat/java/latest
memoryLimit: 3Gi
preferences:
java.jdt.ls.vmargs: '-javaagent:/lombok.jar'
java.server.launchMode: Standard
java.import.gradle.enabled: false
- id: eamodio/gitlens/latest
type: chePlugin
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
- id: github/vscode-pull-request-github/latest
type: chePlugin
- id: redhat/vscode-xml/latest
type: chePlugin
- id: donjayamanne/githistory/latest
type: chePlugin
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
- id: asciidoctor/asciidoctor-vscode/latest
type: chePlugin
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
- type: dockerimage
alias: jkube-dev
image: 'quay.io/sunix/jkube-dev:latest'
env:
- name: MAVEN_CONFIG
value: ''
- name: MAVEN_OPTS
value: '-XX:MaxRAMPercentage=50 -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/user'
- name: JAVA_OPTS
value: '-XX:MaxRAMPercentage=50 -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'
- name: JAVA_TOOL_OPTIONS
value: '-XX:MaxRAMPercentage=50 -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'
memoryLimit: 2Gi
mountSources: true
volumes:
- name: m2
containerPath: /home/user/.m2
- name: www
containerPath: /var/www/html
- name: kube
containerPath: /home/user/.kube
endpoints:
- attributes:
public: 'false'
name: debug
port: 8000
- mountSources: true
endpoints:
- name: httpd
attributes:
public: 'true'
port: 8080
memoryLimit: 64Mi
type: dockerimage
image: 'quay.io/centos7/httpd-24-centos7:latest'
alias: jkube-doc-httpd
volumes:
- name: www
containerPath: /var/www/html
- id: redhat/vscode-openshift-connector/latest
type: chePlugin
- memoryLimit: 64Mi
type: dockerimage
volumes:
- name: www
containerPath: /var/www/html
alias: surgesh
image: 'quay.io/sunix/surge.sh:latest'
commands:
- name: build all
actions:
- type: exec
component: jkube-dev
command: mvn clean install
workdir: '${CHE_PROJECTS_ROOT}/jkube'
- name: build all skipTests
actions:
- type: exec
component: jkube-dev
command: mvn clean install -Dmaven.test.skip -DskipTests
workdir: '${CHE_PROJECTS_ROOT}/jkube'
- name: build current project with all dependent modules
actions:
- type: exec
component: jkube-dev
command: |
baseFolder=${workspaceFolder};
currentProject=${workspaceFolder};
currentFile=${file};
for projectPath in $(mvn -q --also-make exec:exec -Dexec.executable="pwd");
do
if [ -z "${currentFile##*$projectPath*}" -a -z "${projectPath##*$currentProject*}" ];
then
currentProject=$projectPath;
fi;
done
mvn -amd -pl ${currentProject#$baseFolder} clean install -Dmaven.test.skip
workdir: '${workspaceFolder}'
- name: doc-build kubernetes-maven-plugin
actions:
- type: exec
component: jkube-dev
command: mvn clean -Phtml package -Dasciidoctor.outputHtmlDirectory='/var/www/html'
workdir: '${CHE_PROJECTS_ROOT}/jkube/kubernetes-maven-plugin/doc'
- name: doc-watch kubernetes-maven-plugin
actions:
- type: exec
component: jkube-dev
command: mvn clean -Pdoc-watch package -Dasciidoctor.outputHtmlDirectory='/var/www/html'
workdir: '${CHE_PROJECTS_ROOT}/jkube/kubernetes-maven-plugin/doc'
- name: doc-build gradle-plugin
actions:
- workdir: '${CHE_PROJECTS_ROOT}/jkube/gradle-plugin/doc'
type: exec
command: mvn clean -Phtml package -Dasciidoctor.outputHtmlDirectory='/var/www/html'
component: jkube-dev
- name: doc-watch gradle-plugin
actions:
- type: exec
component: jkube-dev
command: mvn clean -Pdoc-watch package -Dasciidoctor.outputHtmlDirectory='/var/www/html'
workdir: '${CHE_PROJECTS_ROOT}/jkube/gradle-plugin/doc'
- name: doc-build jkube-kit
actions:
- workdir: '${CHE_PROJECTS_ROOT}/jkube/jkube-kit/doc'
type: exec
command: mvn clean -Phtml package -Dasciidoctor.outputHtmlDirectory='/var/www/html'
component: jkube-dev
- name: doc-watch jkube-kit
actions:
- workdir: '${CHE_PROJECTS_ROOT}/jkube/jkube-kit/doc'
type: exec
command: mvn clean -Pdoc-watch package -Dasciidoctor.outputHtmlDirectory='/var/www/html'
component: jkube-dev
- name: 'run mvnDebug k8s:build quickstart/current'
actions:
- type: exec
component: jkube-dev
command: |
while [ ! -f pom.xml ] && [ "$(exec pwd)" != / ]; do cd ..; done
/usr/share/maven/bin/mvnDebug k8s:build -Djkube.build.strategy=jib -Djkube.version=1.6.0-SNAPSHOT
workdir: '${fileDirname}'
- name: 'run mvn k8s:build quickstart/current'
actions:
- type: exec
component: jkube-dev
command: |
while [ ! -f pom.xml ] && [ "$(exec pwd)" != / ]; do cd ..; done
mvn k8s:build -Djkube.build.strategy=jib -Djkube.version=1.6.0-SNAPSHOT
workdir: '${fileDirname}'
- name: 'run gradleDebug k8sBuild quickstart/current'
actions:
- type: exec
component: jkube-dev
command: |
while [ ! -f build.gradle ] && [ "$(exec pwd)" != / ]; do cd ..; done
./gradlew k8sBuild -Djkube.build.strategy=jib -Dorg.gradle.debug=true
workdir: '${fileDirname}'
- name: 'run gradle k8s:build quickstart/current'
actions:
- type: exec
component: jkube-dev
command: |
while [ ! -f build.gradle ] && [ "$(exec pwd)" != / ]; do cd ..; done
./gradlew k8sBuild -Djkube.build.strategy=jib
workdir: '${fileDirname}'
- name: connect java debugger mvnDebug
actions:
- type: vscode-launch
referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Remote",
"request": "attach",
"hostName": "localhost",
"port": 8000
}]
}
- name: doc-publish to surge.sh
actions:
- workdir: /var/www/html
type: exec
command: 'surge ./ "jkubedoc-$CHE_WORKSPACE_NAMESPACE-$CHE_WORKSPACE_NAME.surge.sh" && echo "Checkout the publised JKube doc at https://jkubedoc-$CHE_WORKSPACE_NAMESPACE-$CHE_WORKSPACE_NAME.surge.sh/"'
component: surgesh