forked from eclipse-che/che-plugin-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.devfile.yaml
51 lines (51 loc) · 2.62 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
schemaVersion: 2.2.0
metadata:
name: che-plugin-registry-dev
components:
- name: builder
container:
image: quay.io/devfile/universal-developer-image:ubi8-latest
memoryRequest: 256Mi
memoryLimit: 8Gi
cpuRequest: 100m
cpuLimit: 2000m
env:
- name: CONCURRENTLY_OPTS
value: -m 1
endpoints:
- name: openvsx
exposure: internal
targetPort: 5432
commands:
- id: build
exec:
label: "1. Build and Publish a Custom Plugin Registry"
component: builder
commandLine: |
set -o xtrace;
rm -rf output;
mkdir output;
BUILDER=podman SKIP_TEST=true SKIP_FORMAT=true SKIP_LINT=true NODE_BUILD_OPTIONS="-max-old-space-size=1024" ./build.sh &&
export IMAGE=image-registry.openshift-image-registry.svc:5000/$(kubectl get sa default -o json | jq -r '.metadata.namespace')/che-plugin-registry &&
podman tag quay.io/eclipse/che-plugin-registry:next ${IMAGE} &&
podman login --tls-verify=false -u $(oc whoami | tr -d :) -p $(oc whoami -t) image-registry.openshift-image-registry.svc:5000 &&
podman push --tls-verify=false "${IMAGE}"
- id: configure-custom-plugin-registry
exec:
label: "2. Configure Che to use the Custom Plugin Registry"
component: builder
commandLine: |
export IMAGE=image-registry.openshift-image-registry.svc:5000/$(kubectl get sa default -o json | jq -r '.metadata.namespace')/che-plugin-registry &&
export CHECLUSTER_NAMESPACE="$(kubectl get checluster --all-namespaces -o json | jq -r '.items[0].metadata.namespace')" &&
kubectl create secret -n "${CHECLUSTER_NAMESPACE}" docker-registry regcred --docker-server=image-registry.openshift-image-registry.svc:5000 --docker-username=$(oc whoami | tr -d :) --docker-password=$(oc whoami -t) &&
kubectl patch serviceaccount default -n "${CHECLUSTER_NAMESPACE}" -p '{"imagePullSecrets": [{"name": "regcred"}]}' &&
./patch-checluster.sh "${IMAGE}"
- id: enable-embedded-openvsx
exec:
label: "3. Configure Che to use the embedded Eclipse Open VSX server"
component: builder
commandLine: |
export CHECLUSTER_NAME="$(kubectl get checluster --all-namespaces -o json | jq -r '.items[0].metadata.name')" &&
export CHECLUSTER_NAMESPACE="$(kubectl get checluster --all-namespaces -o json | jq -r '.items[0].metadata.namespace')" &&
export PATCH='{"spec":{"components":{"pluginRegistry":{"openVSXURL":""}}}}' &&
kubectl patch checluster "${CHECLUSTER_NAME}" --type=merge --patch "${PATCH}" -n "${CHECLUSTER_NAMESPACE}"