-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage_scenario_text.yml
More file actions
138 lines (123 loc) · 4.12 KB
/
Copy pathusage_scenario_text.yml
File metadata and controls
138 lines (123 loc) · 4.12 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
name: Nextcloud - Text - MariaDB - Firefox
author: Arne Tarara <arne@green-coding.io> + Didi Hoffmann <didi@green-coding.io>
description: Nexcloud Text Scenario
compose-file: !include compose.yml
custom_metrics:
document_editing:
unit: Character per Participant
services:
gcb-playwright:
image: greencoding/gcb_playwright:v21
depends_on:
app:
condition: service_healthy
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode
environment:
DISPLAY: ":0" # for debugging in non-headless mode
HOST_URL: https://ncs
command: [ "tail", "-f", "/dev/null" ] # keep container running
ncs:
mem_limit: 500MB # this should be enough and leaves room for the App container to have ~4 GB
# this code will never support local filenames
# as it anyway would require a change in the usage scenario file
# since that is the case a local dev could also just mount a local folder which is already
# a supported feature
relations:
server: # will be put in /tmp/relations/server
url: https://github.com/nextcloud/server
branch: __GMT_VAR_BRANCH__
commit_hash: __GMT_VAR_COMMIT_HASH__
text:
url: https://github.com/nextcloud/text
branch: main
commit_hash: __GMT_VAR_TEXT_COMMIT_HASH__
# commit_hash: ghhkshfkjsdnfk # no commit means latest
viewer:
url: https://github.com/nextcloud/viewer
branch: master
commit_hash: __GMT_VAR_VIEWER_COMMIT_HASH__
flow:
- name: Patch config
container: app
hidden: true
commands:
- type: console
shell: bash
command: |
cat <<'EOF' > config/config.php
<?php
$CONFIG = array (
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://ncs',
'trusted_proxies' =>
array (
0 => 'ncs',
),
'trusted_domains' =>
array (
0 => 'ncs',
),
'upgrade.disable-web' => true,
'instanceid' => 'ocvb0i3uw47a',
);
EOF
- name: Install Nextcloud
container: gcb-playwright
hidden: true
commands:
- type: console
command: python3 /tmp/repo/playwright-files/install.py firefox
- name: Install Apps
hidden: true
container: app
commands:
- type: console
command: |
mkdir /var/www/html/apps/viewer/
cp -r /tmp/relations/viewer/* /var/www/html/apps/viewer/
chown -R www-data:www-data /var/www/html/apps/viewer/
cd /var/www/html/apps/viewer/
sudo -u www-data npm ci
sudo -u www-data npm run build
sudo -u www-data php /var/www/html/occ app:enable viewer
shell: bash
- type: console
command: |
mkdir /var/www/html/apps/text/
cp -r /tmp/relations/text/* /var/www/html/apps/text/
chown -R www-data:www-data /var/www/html/apps/text/
cd /var/www/html/apps/text/
sudo -u www-data composer install --no-dev --no-scripts
sudo -u www-data make npm-init build-js-production
sudo -u www-data php /var/www/html/occ app:enable text
shell: bash
- name: Create User
container: gcb-playwright
commands:
- type: console
command: python3 /tmp/repo/playwright-files/docs_create_user.py firefox
note: Creating event
read-notes-stdout: true
- name: Docs create and share
container: gcb-playwright
commands:
- type: console
command: python3 /tmp/repo/playwright-files/docs_create_doc_and_share.py firefox
note: Creating event
read-notes-stdout: true
- name: Collaborative Editing
container: gcb-playwright
commands:
- type: console
command: python3 /tmp/repo/playwright-files/docs_collaboration.py firefox
note: Creating event
read-notes-stdout: true
- name: Delete User
container: gcb-playwright
commands:
- type: console
command: python3 /tmp/repo/playwright-files/docs_delete_user_and_file.py firefox
note: Creating event
read-notes-stdout: true