-
Notifications
You must be signed in to change notification settings - Fork 9
/
.devfile.yaml
81 lines (81 loc) · 2.25 KB
/
.devfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
schemaVersion: 2.2.0
metadata:
name: inventory-quarkus
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: none
name: test
protocol: http
targetPort: 8081
- exposure: public
name: inventory
protocol: http
targetPort: 8080
path: /
memoryRequest: 5Mi
memoryLimit: 6G
cpuRequest: 1000m
cpuLimit: 4000m
commands:
- id: package
exec:
label: "1. Package"
component: tools
workingDir: ${PROJECTS_ROOT}/inventory-quarkus
commandLine: "./mvnw clean package -DskipTests=true"
group:
kind: build
isDefault: true
- id: runtests
exec:
label: "2. Run Tests"
component: tools
workingDir: ${PROJECTS_ROOT}/inventory-quarkus
commandLine: "./mvnw test"
group:
kind: test
- id: startdev
exec:
label: "3. Start Development mode (Hot reload + debug)"
component: tools
workingDir: ${PROJECTS_ROOT}/inventory-quarkus
commandLine: "./mvnw compile quarkus:dev"
group:
kind: run
isDefault: true
- id: buildimage
exec:
label: "4. Build Image"
component: tools
workingDir: ${PROJECT_SOURCE}
commandLine: |
IMAGE=image-registry.openshift-image-registry.svc:5000/openshift/quarkus-api-example
podman build -f src/main/docker/Dockerfile.jvm -t "${IMAGE}" .
group:
kind: build
- id: pushimage
exec:
label: "5. Push Image"
component: tools
commandLine: |
# Requires `oc policy add-role-to-user registry-editor <user_name> -n openshift`
IMAGE=image-registry.openshift-image-registry.svc:5000/openshift/quarkus-api-example
podman login --tls-verify=false -u $(oc whoami) -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000
podman push --tls-verify=false "${IMAGE}"
group:
kind: build
events:
postStart:
- package