forked from che-incubator/che-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevfile.yaml
99 lines (91 loc) · 3.08 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#
# Copyright (c) 2022-2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
schemaVersion: 2.1.0
metadata:
name: che-code
components:
- name: dev
container:
image: quay.io/che-incubator/che-code-dev:insiders
memoryLimit: 12Gi
memoryRequest: 512Mi
cpuRequest: 500m
cpuLimit: 3500m
endpoints:
- exposure: public
name: dev
secure: true
protocol: http
targetPort: 8000
- name: projects
volume:
size: 7Gi
commands:
- id: yarn-prepare
exec:
label: Install node dependencies
component: dev
workingDir: ${PROJECTS_ROOT}/che-code
commandLine: |
yarn prepare
group:
kind: build
- id: yarn-build
exec:
label: Compile with Yarn
component: dev
workingDir: ${PROJECTS_ROOT}/che-code
commandLine: |
yarn watch
group:
kind: build
isDefault: true
- id: yarn-run
exec:
label: Run VS Code server on port 8000
component: dev
workingDir: ${PROJECTS_ROOT}/che-code
commandLine: |
yarn server
group:
kind: run
isDefault: true
- id: podman-compile-libc
exec:
label: Compile che-code in a ubi8-based container using Podman
component: dev
workingDir: ${PROJECTS_ROOT}/che-code
commandLine: |
echo "Compile libc-ubi8 mod"
cp -f build/dockerfiles/linux-libc-ubi8.Dockerfile build/dockerfiles/linux-libc-ubi8.no-test.Dockerfile
REMOVE_FROM="### Beginning of tests"
REMOVE_TO="### Ending of tests"
sed -i "/${REMOVE_FROM}/,/${REMOVE_TO}/d" build/dockerfiles/linux-libc-ubi8.no-test.Dockerfile
podman build -f build/dockerfiles/linux-libc-ubi8.no-test.Dockerfile -t linux-libc-ubi8-amd64 .
group:
kind: run
- id: podman-assemble-che-code
exec:
label: Build che-code image using Podman
component: dev
workingDir: ${PROJECTS_ROOT}/che-code
commandLine: |
echo "Build che-code image"
cp -f build/dockerfiles/assembly.Dockerfile build/dockerfiles/assembly.libc.Dockerfile
REPLACE="FROM linux-libc-ubi9-amd64 as linux-libc-ubi9-content"
sed -i -r -e "s|${REPLACE}||" build/dockerfiles/assembly.libc.Dockerfile
REPLACE="COPY --from=linux-libc-ubi9-content --chown=0:0 /checode-linux-libc/ubi9 /mnt/rootfs/checode-linux-libc/ubi9"
sed -i -r -e "s|${REPLACE}||" build/dockerfiles/assembly.libc.Dockerfile
REPLACE="FROM linux-musl-amd64 as linux-musl-content"
sed -i -r -e "s|${REPLACE}||" build/dockerfiles/assembly.libc.Dockerfile
REPLACE="COPY --from=linux-musl-content --chown=0:0 /checode-linux-musl /mnt/rootfs/checode-linux-musl"
sed -i -r -e "s|${REPLACE}||" build/dockerfiles/assembly.libc.Dockerfile
podman build -f build/dockerfiles/assembly.libc.Dockerfile -t che-code .
group:
kind: run