-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy path.devfile.yaml
More file actions
57 lines (57 loc) · 2.18 KB
/
.devfile.yaml
File metadata and controls
57 lines (57 loc) · 2.18 KB
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
schemaVersion: 2.3.0
metadata:
name: developer-images
attributes:
controller.devfile.io/storage-type: ephemeral
controller.devfile.io/scc: container-build
components:
- name: devtools
container:
image: quay.io/devfile/universal-developer-image:ubi9-latest
memoryLimit: 6Gi
memoryRequest: 256Mi
commands:
- id: build-and-push-base-image
exec:
label: "1. Build and push base developer image"
component: devtools
workingDir: ${PROJECT_SOURCE}
commandLine: |
export DOCKER=podman &&
read -p "ENTER UBI version (ubi9 or ubi10): " UBI_VERSION &&
read -p "ENTER container registry org (e.g. quay.io/devfile): " IMG_REPO &&
read -p "ENTER image tag (e.g. ubi9-latest): " IMG_TAG &&
read -p "ENTER platform (leave empty for default, or linux/amd64, linux/arm64): " PLATFORM &&
export IMG_NAME=${IMG_REPO}/base-developer-image:${IMG_TAG} &&
cd base/${UBI_VERSION} &&
if [ -z "$PLATFORM" ]; then
${DOCKER} build --progress=plain -t ${IMG_NAME} .
else
${DOCKER} build --platform ${PLATFORM} --progress=plain -t ${IMG_NAME} .
fi &&
${DOCKER} push ${IMG_NAME}
group:
kind: build
isDefault: false
- id: build-and-push-universal-image
exec:
label: "2. Build and push universal developer image"
component: devtools
workingDir: ${PROJECT_SOURCE}
commandLine: |
export DOCKER=podman &&
read -p "ENTER UBI version (ubi9 or ubi10): " UBI_VERSION &&
read -p "ENTER container registry org (e.g. quay.io/devfile): " IMG_REPO &&
read -p "ENTER image tag (e.g. ubi9-latest): " IMG_TAG &&
read -p "ENTER platform (leave empty for default, or linux/amd64, linux/arm64): " PLATFORM &&
export IMG_NAME=${IMG_REPO}/universal-developer-image:${IMG_TAG} &&
cd universal/${UBI_VERSION} &&
if [ -z "$PLATFORM" ]; then
${DOCKER} build --progress=plain -t ${IMG_NAME} .
else
${DOCKER} build --platform ${PLATFORM} --progress=plain -t ${IMG_NAME} .
fi &&
${DOCKER} push ${IMG_NAME}
group:
kind: build
isDefault: true