-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathdevfile.yaml
83 lines (83 loc) · 2 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
schemaVersion: 2.2.0
metadata:
name: java-springboot
version: 1.1.0
attributes:
alpha.dockerimage-port: 8081
displayName: Java Spring Boot
description: Java Spring Boot using Maven
tags: ["Java", "Spring"]
projectType: "springboot"
language: "java"
provider: Red Hat
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
components:
- name: outerloop-build
image:
imageName: java-springboot-image:latest
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: outerloop-deploy
kubernetes:
uri: outerloop-deploy.yaml
- name: tools
container:
image: quay.io/eclipse/che-java11-maven:7.36.0
memoryLimit: 1Gi
cpuLimit: 500m
env:
- name: DEBUG_PORT
value: '5005'
endpoints:
- name: 8080-tcp
exposure: public
protocol: http
targetPort: 8080
- name: debug
exposure: none
protocol: tcp
targetPort: 5005
volumeMounts:
- name: m2
path: /home/user/.m2
- name: m2
volume:
size: 3Gi
commands:
- id: build
exec:
component: tools
commandLine: "mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true"
group:
kind: build
isDefault: true
- id: run
exec:
component: tools
commandLine: "mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run"
group:
kind: run
isDefault: true
- id: debug
exec:
component: tools
commandLine: "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n -jar target/*.jar"
group:
kind: debug
isDefault: true
- id: build-image
apply:
component: outerloop-build
- id: deployk8s
apply:
component: outerloop-deploy
- id: deploy
composite:
commands:
- build-image
- deployk8s
group:
kind: deploy
isDefault: true