-
Notifications
You must be signed in to change notification settings - Fork 11
/
devfile.yaml
70 lines (70 loc) · 2.12 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
schemaVersion: 2.1.0
metadata:
name: spring-music
projects:
- name: summit-lab-spring-music
git:
remotes:
origin: 'https://github.com/edeandrea/summit-lab-spring-music.git'
checkoutFrom:
revision: pipeline
components:
- name: m2
volume: {}
- name: spring-music
container:
image: 'quay.io/devfile/universal-developer-image:ubi8-latest'
mountSources: true
memoryLimit: 2048Mi
volumeMounts:
- name: m2
path: /home/jboss/.m2
endpoints:
- name: spring-music
targetPort: 8080
commands:
- id: switch-to-java-17
exec:
component: spring-music
commandLine: |
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 17.0.6-tem
- id: build
exec:
component: spring-music
commandLine: ./mvnw clean install
workingDir: '${PROJECTS_ROOT}/summit-lab-spring-music'
group:
kind: build
isDefault: true
- id: run-application-locally
exec:
workingDir: '${PROJECTS_ROOT}/summit-lab-spring-music'
commandLine: ./mvnw clean spring-boot:run -DskipTests
component: spring-music
group:
kind: run
isDefault: true
- id: debug-application-locally
exec:
component: spring-music
commandLine: ./mvnw clean spring-boot:run -DskipTests -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
workingDir: '${PROJECTS_ROOT}/summit-lab-spring-music'
group:
kind: debug
isDefault: true
- id: dependency-analysis
exec:
workingDir: '${PROJECTS_ROOT}/summit-lab-spring-music'
component: spring-music
commandLine: '${HOME}/stack-analysis.sh -f ${PROJECTS_ROOT}/summit-lab-spring-music/pom.xml -p ${PROJECTS_ROOT}/summit-lab-spring-music'
- id: deploy-to-openshift
exec:
workingDir: '${PROJECTS_ROOT}/summit-lab-spring-music'
commandLine: ./mvnw clean oc:deploy -Popenshift -DskipTests
component: spring-music
group:
kind: run
events:
postStart:
- switch-to-java-17