Skip to content

Commit

Permalink
Create devfile-quarkus.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalvankar authored Feb 9, 2023
1 parent c156c97 commit a1e0c56
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions devfile-quarkus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
schemaVersion: 2.1.0
metadata:
generateName: quarkus-api-example
attributes:
controller.devfile.io/storage-type: ephemeral
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
env:
- name: QUARKUS_HTTP_HOST
value: 0.0.0.0
endpoints:
- exposure: none
name: debug
protocol: tcp
targetPort: 5005
- exposure: public
name: list-all-food
protocol: http
targetPort: 8080
path: /food
volumeMounts:
- name: m2
path: /home/user/.m2
memoryLimit: 4G
mountSources: true

- name: ubi-minimal
container:
image: registry.access.redhat.com/ubi8/ubi-minimal
command: ['tail']
args: ['-f', '/dev/null']
memoryLimit: 64M
mountSources: true

- name: postgresql
container:
image: 'quay.io/centos7/postgresql-13-centos7@sha256:994f5c622e2913bda1c4a7fa3b0c7e7f75e7caa3ac66ff1ed70ccfe65c40dd75'
env:
- name: POSTGRESQL_USER
value: user
- name: POSTGRESQL_PASSWORD
value: password
- name: POSTGRESQL_DATABASE
value: food_db
- name: PGDATA
value: /tmp/pgdata
- name: m2
volume:
size: 1G
commands:
- id: package
exec:
label: "Package"
component: tools
workingDir: ${PROJECTS_ROOT}/quarkus-api-example
commandLine: "./mvnw clean package -DskipTests=true"
group:
kind: build
isDefault: true
- id: runtests
exec:
label: "Run Tests"
component: tools
workingDir: ${PROJECTS_ROOT}/quarkus-api-example
commandLine: "./mvnw test"
group:
kind: test
- id: packagenative
exec:
label: "Package Native"
component: tools
workingDir: ${PROJECTS_ROOT}/quarkus-api-example
commandLine: "./mvnw package -Dnative -Dmaven.test.skip -Dquarkus.native.native-image-xmx=3G"
group:
kind: build
- id: startdev
exec:
label: "Start Development mode (Hot reload + debug)"
component: tools
workingDir: ${PROJECTS_ROOT}/quarkus-api-example
commandLine: "./mvnw compile quarkus:dev"
group:
kind: run
isDefault: true
- id: startnative
exec:
label: "Start Native"
component: ubi-minimal
workingDir: ${PROJECTS_ROOT}/quarkus-api-example/target
commandLine: "./quarkus-api-example-1.0.0-SNAPSHOT-runner"
group:
kind: run
- id: buildimage
exec:
label: "Build Image"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: "podman build -f src/main/docker/Dockerfile.jvm -t quay.io/che-incubator/quarkus-api-example ."
group:
kind: build
- id: tag
exec:
label: "Tag Image"
component: tools
workingDir: ${PROJECTS_ROOT}/quarkus-api-example
commandLine: "podman tag localhost/quarkus/getting-started-jvm:latest quay.io/ibuziuk/quarkus-api-example:demo"
group:
kind: test
- id: deploypostgres
exec:
label: "Deploy Postrgres"
component: tools
workingDir: ${PROJECTS_ROOT}/quarkus-api-example
commandLine: "oc new-app -e POSTGRESQL_USER=user -e POSTGRESQL_PASSWORD=password -e POSTGRESQL_DATABASE=food_db postgresql:10-el7 -n demo"
group:
kind: test

0 comments on commit a1e0c56

Please sign in to comment.