Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to devfile 220 #1

Merged
merged 3 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 29 additions & 13 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
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
image: quay.io/eclipse/che-java11-maven:7.36.0
memoryLimit: 768Mi
mountSources: true
endpoints:
Expand Down Expand Up @@ -61,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
25 changes: 25 additions & 0 deletions outerloop-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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"