From 3d47d52ec985789fe20881a82be0f109886020cf Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 4 Nov 2021 12:27:30 -0400 Subject: [PATCH 1/3] update to devfile 220 Signed-off-by: Stephanie --- devfile.yaml | 28 +++++++++++++++------------- outerloop-deploy.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 outerloop-deploy.yaml diff --git a/devfile.yaml b/devfile.yaml index a7794205..86cafc07 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,15 +20,16 @@ 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 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" From d23984c81e7c0e3c098e6e9ca1af2bb4520a4b55 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Fri, 5 Nov 2021 11:21:44 -0400 Subject: [PATCH 2/3] add deploy cmd Signed-off-by: Stephanie --- devfile.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/devfile.yaml b/devfile.yaml index 86cafc07..0b8a36d4 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -68,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 From c2bfd41c9e30dc47df8d1cbf8ed42fed83dbbca5 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Wed, 10 Nov 2021 15:06:01 -0500 Subject: [PATCH 3/3] nightly image no longer exist, use 7.36.0 Signed-off-by: Stephanie --- devfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devfile.yaml b/devfile.yaml index 0b8a36d4..874bde1f 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -32,7 +32,7 @@ components: 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: