-
Notifications
You must be signed in to change notification settings - Fork 91
/
devfile.yaml
92 lines (92 loc) · 2.29 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
schemaVersion: 2.2.0
metadata:
name: java-springboot
displayName: Spring Boot®
description: Java application using Spring Boot® and OpenJDK 11
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg
tags:
- Java
- Spring
projectType: springboot
language: Java
version: 2.0.0
globalMemoryLimit: 2674Mi
starterProjects:
- name: springbootproject
git:
remotes:
origin: "https://github.com/devfile-samples/springboot-ex.git"
components:
- name: tools
container:
image: registry.access.redhat.com/ubi8/openjdk-11:1.19-4.1715070694
command: ['tail', '-f', '/dev/null']
memoryLimit: 768Mi
mountSources: true
endpoints:
- name: http-springboot
targetPort: 8080
- exposure: none
name: debug
targetPort: 5858
volumeMounts:
- name: m2
path: /home/user/.m2
env:
- name: DEBUG_PORT
value: "5858"
- name: m2
volume:
size: 3Gi
- name: build
image:
imageName: java-springboot-image:latest
dockerfile:
uri: docker/Dockerfile
buildContext: .
rootRequired: false
- name: deploy
kubernetes:
uri: kubernetes/deploy.yaml
endpoints:
- name: http-8081
targetPort: 8081
commands:
- id: build
exec:
component: tools
workingDir: ${PROJECT_SOURCE}
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
workingDir: ${PROJECT_SOURCE}
commandLine: 'mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run'
group:
kind: run
isDefault: true
- id: debug
exec:
component: tools
workingDir: ${PROJECT_SOURCE}
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: build
- id: deployk8s
apply:
component: deploy
- id: deploy
composite:
commands:
- build-image
- deployk8s
group:
kind: deploy
isDefault: true