-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Parthvi Vala <[email protected]>
- Loading branch information
1 parent
9d13836
commit d9d262c
Showing
4 changed files
with
202 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
192 changes: 93 additions & 99 deletions
192
tests/examples/source/devfiles/springboot/devfile-deploy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,96 @@ | ||
--- | ||
schemaVersion: 2.2.0 | ||
commands: | ||
- exec: | ||
commandLine: mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true | ||
component: tools | ||
group: | ||
isDefault: true | ||
kind: build | ||
workingDir: ${PROJECT_SOURCE} | ||
id: build | ||
- exec: | ||
commandLine: mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run | ||
component: tools | ||
group: | ||
isDefault: true | ||
kind: run | ||
workingDir: ${PROJECT_SOURCE} | ||
id: run | ||
- exec: | ||
commandLine: java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=${DEBUG_PORT},suspend=n | ||
-jar target/*.jar | ||
component: tools | ||
group: | ||
isDefault: true | ||
kind: debug | ||
workingDir: ${PROJECT_SOURCE} | ||
id: debug | ||
- apply: | ||
component: build | ||
id: build-image | ||
- apply: | ||
component: deploy | ||
id: deployk8s | ||
- composite: | ||
commands: | ||
- build-image | ||
- deployk8s | ||
group: | ||
isDefault: true | ||
kind: deploy | ||
id: deploy | ||
components: | ||
- container: | ||
command: | ||
- tail | ||
- -f | ||
- /dev/null | ||
endpoints: | ||
- name: http-springboot | ||
targetPort: 8080 | ||
- exposure: none | ||
name: debug | ||
targetPort: 5858 | ||
env: | ||
- name: DEBUG_PORT | ||
value: "5858" | ||
image: registry.access.redhat.com/ubi8/openjdk-11:latest | ||
memoryLimit: 768Mi | ||
mountSources: true | ||
volumeMounts: | ||
- name: m2 | ||
path: /home/user/.m2 | ||
name: tools | ||
- name: m2 | ||
volume: | ||
size: 3Gi | ||
- image: | ||
dockerfile: | ||
buildContext: . | ||
rootRequired: false | ||
uri: docker/Dockerfile | ||
imageName: java-springboot-image:latest | ||
name: build | ||
- kubernetes: | ||
endpoints: | ||
- name: http-8081 | ||
targetPort: 8081 | ||
uri: kubernetes/deploy.yaml | ||
name: deploy | ||
metadata: | ||
name: java-spring-boot | ||
language: java | ||
description: Java application using Spring Boot® and OpenJDK 11 | ||
displayName: Spring Boot® | ||
globalMemoryLimit: 2674Mi | ||
icon: https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg | ||
language: Java | ||
name: demo | ||
projectType: springboot | ||
tags: | ||
- Java | ||
- Spring | ||
version: 2.0.0 | ||
schemaVersion: 2.2.0 | ||
starterProjects: | ||
- name: springbootproject | ||
git: | ||
remotes: | ||
origin: "https://github.com/odo-devfiles/springboot-ex.git" | ||
components: | ||
- name: tools | ||
container: | ||
image: registry.access.redhat.com/ubi8/openjdk-11:latest | ||
memoryLimit: 768Mi | ||
command: ['tail'] | ||
args: [ '-f', '/dev/null'] | ||
mountSources: true | ||
volumeMounts: | ||
- name: springbootpvc | ||
path: /data/cache/.m2 | ||
- name: runtime | ||
container: | ||
image: registry.access.redhat.com/ubi8/openjdk-11:latest | ||
memoryLimit: 768Mi | ||
endpoints: | ||
- name: "8080-tcp" | ||
targetPort: 8080 | ||
volumeMounts: | ||
- name: springbootpvc | ||
path: /data/cache/.m2 | ||
mountSources: true | ||
- name: springbootpvc | ||
volume: | ||
size: 3Gi | ||
ephemeral: true | ||
- name: outerloop-build | ||
image: | ||
imageName: "{{CONTAINER_IMAGE}}" | ||
dockerfile: | ||
uri: ./Dockerfile | ||
buildContext: ${PROJECTS_ROOT} | ||
rootRequired: false | ||
|
||
- name: outerloop-deploy | ||
kubernetes: | ||
inlined: | | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: my-component | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: springboot-app | ||
template: | ||
metadata: | ||
labels: | ||
app: springboot-app | ||
spec: | ||
containers: | ||
- name: main | ||
image: {{CONTAINER_IMAGE}} | ||
resources: | ||
limits: | ||
memory: "128Mi" | ||
cpu: "500m" | ||
commands: | ||
- id: defaultbuild | ||
exec: | ||
component: tools | ||
commandLine: "mvn clean -Dmaven.repo.local=/data/cache/.m2/repository package -Dmaven.test.skip=true" | ||
workingDir: /projects | ||
group: | ||
kind: build | ||
- id: defaultrun | ||
exec: | ||
component: runtime | ||
commandLine: "mvn -Dmaven.repo.local=/data/cache/.m2/repository spring-boot:run" | ||
workingDir: /projects | ||
group: | ||
kind: run | ||
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 | ||
variables: | ||
CONTAINER_IMAGE: quay.io/unknown-account/myimage | ||
|
||
- git: | ||
remotes: | ||
origin: https://github.com/odo-devfiles/springboot-ex.git | ||
name: springbootproject |
Oops, something went wrong.