From 513522467905c996171511f8b41c5123359d6922 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Thu, 4 Nov 2021 12:34:08 -0400 Subject: [PATCH 1/3] update to devfile 220 Signed-off-by: Stephanie --- devfile.yaml | 26 ++++++++++++++------------ outerloop-deploy.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 outerloop-deploy.yaml diff --git a/devfile.yaml b/devfile.yaml index 95ed163d..56eb2460 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -1,30 +1,32 @@ -schemaVersion: 2.0.0 +schemaVersion: 2.2.0 metadata: name: java-springboot version: 1.1.0 attributes: - alpha.build-context: . - alpha.build-dockerfile: docker/Dockerfile + alpha.dockerimage-port: 8081 displayName: Java Spring Boot description: Java Spring Boot using Maven tags: ["Java", "Spring"] projectType: "springboot" language: "java" + provider: Red Hat + supportUrl: https://github.com/devfile-samples/devfile-support#support-information starterProjects: - name: springbootproject git: remotes: origin: "https://github.com/odo-devfiles/springboot-ex.git" 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-springboot-image:latest + dockerfile: + uri: docker/Dockerfile + buildContext: . + rootRequired: false + - name: outerloop-deploy + kubernetes: + uri: outerloop-deploy.yaml - name: tools container: image: quay.io/eclipse/che-java11-maven:nightly diff --git a/outerloop-deploy.yaml b/outerloop-deploy.yaml new file mode 100644 index 00000000..89e587ed --- /dev/null +++ b/outerloop-deploy.yaml @@ -0,0 +1,25 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: my-java-springboot +spec: + replicas: 1 + selector: + matchLabels: + app: java-springboot-app + template: + metadata: + labels: + app: java-springboot-app + spec: + containers: + - name: my-java-springboot + image: java-springboot-image:latest + ports: + - name: http + containerPort: 8081 + protocol: TCP + resources: + limits: + memory: "1024Mi" + cpu: "500m" From 287f7eb33c4e5653be5ba2d3397efc9c1f93d84b Mon Sep 17 00:00:00 2001 From: Stephanie Date: Fri, 5 Nov 2021 11:22:03 -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 56eb2460..6e200c00 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -63,3 +63,17 @@ commands: group: kind: debug isDefault: true + - 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 From d0c2f7104c30e9071781af7887985aa7775546d1 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Wed, 10 Nov 2021 15:03:55 -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 6e200c00..07862cce 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -29,7 +29,7 @@ components: uri: outerloop-deploy.yaml - name: tools container: - image: quay.io/eclipse/che-java11-maven:nightly + image: quay.io/eclipse/che-java11-maven:7.36.0 memoryLimit: 768Mi mountSources: true endpoints: