Skip to content

Commit 45d40af

Browse files
authored
Merge pull request #1 from yangcao77/main
update to devfile 220
2 parents 82c39fa + c2bfd41 commit 45d40af

2 files changed

Lines changed: 55 additions & 14 deletions

File tree

devfile.yaml

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
schemaVersion: 2.0.0
1+
schemaVersion: 2.2.0
22
metadata:
33
name: java-quarkus
44
version: 1.1.0
5-
attributes:
6-
alpha.build-context: .
7-
alpha.build-dockerfile: src/main/docker/Dockerfile.jvm.staged
5+
provider: Red Hat
6+
supportUrl: https://github.com/devfile-samples/devfile-support#support-information
87
website: https://quarkus.io
98
displayName: Quarkus Java
109
description: Upstream Quarkus with Java+GraalVM
1110
tags: ["Java", "Quarkus"]
1211
projectType: "quarkus"
1312
language: "java"
13+
attributes:
14+
alpha.dockerimage-port: 8081
1415
starterProjects:
1516
- name: community
1617
zip:
@@ -19,18 +20,19 @@ starterProjects:
1920
zip:
2021
location: https://code.quarkus.redhat.com/d?e=io.quarkus%3Aquarkus-resteasy&e=io.quarkus%3Aquarkus-smallrye-health&e=io.quarkus%3Aquarkus-openshift
2122
components:
22-
- name: buildguidance
23-
attributes:
24-
tool: console-import
25-
container:
26-
image: buildguidanceimage-placeholder
27-
memoryLimit: 1024Mi
28-
endpoints:
29-
- name: http-8081
30-
targetPort: 8081
23+
- name: outerloop-build
24+
image:
25+
imageName: java-quarkus-image:latest
26+
dockerfile:
27+
uri: src/main/docker/Dockerfile.jvm.staged
28+
buildContext: .
29+
rootRequired: false
30+
- name: outerloop-deploy
31+
kubernetes:
32+
uri: outerloop-deploy.yaml
3133
- name: tools
3234
container:
33-
image: quay.io/eclipse/che-quarkus:nightly
35+
image: quay.io/eclipse/che-quarkus:7.36.0
3436
memoryLimit: 1512Mi
3537
mountSources: true
3638
volumeMounts:
@@ -66,6 +68,20 @@ commands:
6668
kind: debug
6769
isDefault: true
6870
workingDir: $PROJECTS_ROOT
71+
- id: build-image
72+
apply:
73+
component: outerloop-build
74+
- id: deployk8s
75+
apply:
76+
component: outerloop-deploy
77+
- id: deploy
78+
composite:
79+
commands:
80+
- build-image
81+
- deployk8s
82+
group:
83+
kind: deploy
84+
isDefault: true
6985
events:
7086
postStart:
7187
- init-compile

outerloop-deploy.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
kind: Deployment
2+
apiVersion: apps/v1
3+
metadata:
4+
name: my-java-quarkus
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: java-quarkus-app
10+
template:
11+
metadata:
12+
labels:
13+
app: java-quarkus-app
14+
spec:
15+
containers:
16+
- name: my-java-quarkus
17+
image: java-quarkus-image:latest
18+
ports:
19+
- name: http
20+
containerPort: 8081
21+
protocol: TCP
22+
resources:
23+
limits:
24+
memory: "1024Mi"
25+
cpu: "500m"

0 commit comments

Comments
 (0)