-
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.
Use java devfile for odo dev testing and nodejs for debugging
Signed-off-by: Parthvi Vala <[email protected]>
- Loading branch information
1 parent
4c21939
commit 9d13836
Showing
4 changed files
with
215 additions
and
104 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
102 changes: 102 additions & 0 deletions
102
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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
--- | ||
schemaVersion: 2.2.0 | ||
metadata: | ||
name: java-spring-boot | ||
language: java | ||
projectType: springboot | ||
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 | ||
|
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