diff --git a/devfile.yaml b/devfile.yaml index a7794205..874bde1f 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,16 +1,17 @@ -schemaVersion: 2.0.0 +schemaVersion: 2.2.0 metadata: name: java-quarkus version: 1.1.0 - attributes: - alpha.build-context: . - alpha.build-dockerfile: src/main/docker/Dockerfile.jvm.staged + provider: Red Hat + supportUrl: https://github.com/devfile-samples/devfile-support#support-information website: https://quarkus.io displayName: Quarkus Java description: Upstream Quarkus with Java+GraalVM tags: ["Java", "Quarkus"] projectType: "quarkus" language: "java" + attributes: + alpha.dockerimage-port: 8081 starterProjects: - name: community zip: @@ -19,18 +20,19 @@ starterProjects: zip: location: https://code.quarkus.redhat.com/d?e=io.quarkus%3Aquarkus-resteasy&e=io.quarkus%3Aquarkus-smallrye-health&e=io.quarkus%3Aquarkus-openshift components: - - name: buildguidance - attributes: - tool: console-import - container: - image: buildguidanceimage-placeholder - memoryLimit: 1024Mi - endpoints: - - name: http-8081 - targetPort: 8081 + - name: outerloop-build + image: + imageName: java-quarkus-image:latest + dockerfile: + uri: src/main/docker/Dockerfile.jvm.staged + buildContext: . + rootRequired: false + - name: outerloop-deploy + kubernetes: + uri: outerloop-deploy.yaml - name: tools container: - image: quay.io/eclipse/che-quarkus:nightly + image: quay.io/eclipse/che-quarkus:7.36.0 memoryLimit: 1512Mi mountSources: true volumeMounts: @@ -66,6 +68,20 @@ commands: kind: debug isDefault: true workingDir: $PROJECTS_ROOT + - 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 events: postStart: - init-compile diff --git a/outerloop-deploy.yaml b/outerloop-deploy.yaml new file mode 100644 index 00000000..c5a4b270 --- /dev/null +++ b/outerloop-deploy.yaml @@ -0,0 +1,25 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: my-java-quarkus +spec: + replicas: 1 + selector: + matchLabels: + app: java-quarkus-app + template: + metadata: + labels: + app: java-quarkus-app + spec: + containers: + - name: my-java-quarkus + image: java-quarkus-image:latest + ports: + - name: http + containerPort: 8081 + protocol: TCP + resources: + limits: + memory: "1024Mi" + cpu: "500m"