forked from eclipse-che/che-plugin-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devfile.yaml
93 lines (83 loc) · 2.91 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
apiVersion: 1.0.0
metadata:
generateName: che-plugin-registry-dev-
components:
- alias: didact-plugin
type: chePlugin
id: redhat/vscode-didact/latest
preferences:
didact.openDefaultTutorialAtStartup: true
che.welcome.enable: false
didact.defaultUrl: /projects/che-plugin-registry/.che-didact-guide.md
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
- id: github/vscode-pull-request-github/latest
type: chePlugin
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
- mountSources: true
memoryLimit: 2G
type: dockerimage
image: 'quay.io/eclipse/che-plugin-registry-dev:latest'
alias: builder
env:
- value: '-m 1'
name: CONCURRENTLY_OPTS
- mountSources: true
endpoints:
- name: registry
port: 8080
memoryLimit: 256Mi
type: dockerimage
volumes:
- name: registryv3
containerPath: /usr/local/apache2/htdocs/v3
image: 'quay.io/eclipse/che-plugin-registry:next'
alias: eclipse-che-plugin-registry
- id: timonwong/shellcheck/latest
type: chePlugin
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
commands:
- name: 1. build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/che-plugin-registry'
type: exec
command: |
set -o xtrace;
rm -rf output;
mkdir output;
BUILDER=docker SKIP_TEST=true SKIP_FORMAT=true SKIP_LINT=true NODE_BUILD_OPTIONS="-max-old-space-size=1024" ./build.sh --skip-oci-image
component: builder
- name: 2. copy to che-plugin-registry server
previewUrl:
port: 8080
path: /v3/
actions:
- workdir: '${CHE_PROJECTS_ROOT}/che-plugin-registry'
type: exec
command: |
set -o xtrace;
rm -rf /usr/local/apache2/htdocs/v3;
cp -rf output/v3 /usr/local/apache2/htdocs/
component: eclipse-che-plugin-registry
- name: 3. publish to surge.sh
actions:
- workdir: '${CHE_PROJECTS_ROOT}/che-plugin-registry/output'
type: exec
command: |
for directory in `find v3/ -type d`
do
(cd $directory && tree -H '.' -L 1 --noreport --charset utf-8 | sed '/<p class="VERSION">/,/<\/p>/d' > index.html);
done
# Make meta.yaml as index
for file in $(find v3 -name 'meta.yaml' -type f)
do
PARENT_DIR=$(dirname $file);
cp ${PARENT_DIR}/meta.yaml ${PARENT_DIR}/index.html;
done
surge ./ ${CHE_WORKSPACE_NAMESPACE}-${CHE_WORKSPACE_NAME}.surge.sh && echo Checkout the published plugin registry at https://${CHE_WORKSPACE_NAMESPACE}-${CHE_WORKSPACE_NAME}.surge.sh/v3/plugins/
component: builder
- name: test entrypoint.sh
actions:
- workdir: '${CHE_PROJECTS_ROOT}/che-plugin-registry/build/dockerfiles'
type: exec
command: ./test_entrypoint.sh
component: eclipse-che-plugin-registry