-
Notifications
You must be signed in to change notification settings - Fork 6
593 lines (512 loc) · 23.6 KB
/
tests-deploy-docker.yml
File metadata and controls
593 lines (512 loc) · 23.6 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
# Adapted from nextcloud/app_api's tests-deploy.yml — keeps the four HaRP-related
# jobs (bridge, bridge-no-tls, host, manual-host) so HaRP PRs exercise the same
# Docker deployment matrix AppAPI does, against the HaRP image built from this
# repo instead of the published ghcr.io:latest tag.
name: Tests - Docker Deploy (HaRP)
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: tests-deploy-docker-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
nc-docker-harp-bridge:
runs-on: ubuntu-22.04
name: NC In Julius Docker (HaRP-Bridge network)
env:
docker-image: ghcr.io/juliusknorr/nextcloud-dev-php83:master
steps:
- name: Checkout AppAPI
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: nextcloud/app_api
ref: main
path: app_api
- name: Checkout HaRP (this PR)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: harp
- name: Build HaRP image (this PR)
working-directory: harp
run: docker build -t ghcr.io/nextcloud/nextcloud-appapi-harp:latest .
- name: Create containers
run: |
docker network create master_bridge
docker run \
-e HP_SHARED_KEY="some_very_secure_password" \
-e NC_INSTANCE_URL="http://nextcloud" \
-e HP_LOG_LEVEL="debug" \
-v /var/run/docker.sock:/var/run/docker.sock \
--net master_bridge --name appapi-harp -h appapi-harp \
--restart unless-stopped \
-d ghcr.io/nextcloud/nextcloud-appapi-harp:latest
docker run --net master_bridge --name nextcloud-docker --rm -d ${{ env.docker-image }}
sed -i 's/127\.0\.0\.1:8080/nextcloud-docker/' app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
sed -i 's/127\.0\.0\.1:8780/appapi-harp:8780/' app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
cat app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
docker run --net master_bridge --name nextcloud --rm \
-v $(pwd)/app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf:/etc/nginx/conf.d/default.conf:ro \
-d nginx
- name: Wait for Nextcloud bootstrap
run: |
for i in $(seq 1 60); do
if docker exec nextcloud-docker test -f /var/www/html/version.php 2>/dev/null; then
echo "Nextcloud source ready after ${i}0s"
break
fi
echo "Waiting for Nextcloud bootstrap... ($i/60)"
sleep 10
done
docker exec nextcloud-docker test -f /var/www/html/version.php || (echo "Bootstrap timed out" && exit 1)
- name: Install AppAPI
run: |
docker exec -w /var/www/html/apps nextcloud-docker git clone https://github.com/nextcloud/app_api.git app_api
docker exec -w /var/www/html/apps/app_api nextcloud-docker git checkout main
docker exec nextcloud-docker sudo -u www-data php occ app:enable app_api
docker exec nextcloud-docker sudo -u www-data php occ app_api:daemon:register \
harp_proxy "Harp Proxy with DSP" "docker-install" "http" "appapi-harp:8780" "http://nextcloud" \
--harp --harp_frp_address "appapi-harp:8782" --harp_shared_key "some_very_secure_password" \
--net=master_bridge --set-default
docker exec nextcloud-docker sudo -u www-data php occ app_api:daemon:list
docker exec nextcloud-docker ping -c 1 appapi-harp
docker exec nextcloud-docker ping -c 1 nextcloud
- name: Registering and enabling Skeleton ExApp
run: |
docker exec nextcloud-docker sudo -u www-data php occ app_api:app:register app-skeleton-python harp_proxy \
--info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml \
--wait-finish
- name: Docker inspect output
if: always()
run: docker inspect nc_app_app-skeleton-python
- name: Disable ExApp
run: |
docker exec nextcloud-docker sudo -u www-data php occ app_api:app:disable app-skeleton-python
- name: Copy NC log to host
if: always()
run: docker cp nextcloud-docker:/var/www/html/data/nextcloud.log nextcloud.log
- name: Check logs
run: |
grep -q 'Hello from app-skeleton-python :)' nextcloud.log || error
grep -q 'Bye bye from app-skeleton-python :(' nextcloud.log || error
- name: Save app and HaRP container info & logs
if: always()
run: |
docker inspect appapi-harp | json_pp > harp_bridge_container.json
docker logs appapi-harp > harp_bridge_container.log 2>&1
docker inspect nc_app_app-skeleton-python | json_pp > app_harp_bridge_container.json
docker logs nc_app_app-skeleton-python > app_harp_bridge_container.log 2>&1
docker logs nextcloud > nginx.log 2>&1
- name: Unregister Skeleton & Daemon
run: |
docker exec nextcloud-docker sudo -u www-data php occ app_api:app:unregister app-skeleton-python
docker exec nextcloud-docker sudo -u www-data php occ app_api:daemon:unregister harp_proxy
- name: Show all logs
if: always()
run: tail -v -n +1 *container.json *.log
nc-docker-harp-bridge-no-tls:
runs-on: ubuntu-22.04
name: NC In Julius Docker (HaRP-Bridge network-no FRP TLS)
env:
docker-image: ghcr.io/juliusknorr/nextcloud-dev-php83:master
steps:
- name: Checkout AppAPI
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: nextcloud/app_api
ref: main
path: app_api
- name: Checkout HaRP (this PR)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: harp
- name: Build HaRP image (this PR)
working-directory: harp
run: docker build -t ghcr.io/nextcloud/nextcloud-appapi-harp:latest .
- name: Create containers
run: |
docker network create master_bridge
docker run \
-e HP_SHARED_KEY="some_very_secure_password" \
-e HP_FRP_DISABLE_TLS="true" \
-e NC_INSTANCE_URL="http://nextcloud" \
-e HP_LOG_LEVEL="debug" \
-v /var/run/docker.sock:/var/run/docker.sock \
--net master_bridge --name appapi-harp -h appapi-harp \
--restart unless-stopped \
-d ghcr.io/nextcloud/nextcloud-appapi-harp:latest
docker run --net master_bridge --name nextcloud-docker --rm -d ${{ env.docker-image }}
sed -i 's/127\.0\.0\.1:8080/nextcloud-docker/' app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
sed -i 's/127\.0\.0\.1:8780/appapi-harp:8780/' app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
cat app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
docker run --net master_bridge --name nextcloud --rm \
-v $(pwd)/app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf:/etc/nginx/conf.d/default.conf:ro \
-d nginx
- name: Wait for Nextcloud bootstrap
run: |
for i in $(seq 1 60); do
if docker exec nextcloud-docker test -f /var/www/html/version.php 2>/dev/null; then
echo "Nextcloud source ready after ${i}0s"
break
fi
echo "Waiting for Nextcloud bootstrap... ($i/60)"
sleep 10
done
docker exec nextcloud-docker test -f /var/www/html/version.php || (echo "Bootstrap timed out" && exit 1)
- name: Install AppAPI
run: |
docker exec -w /var/www/html/apps nextcloud-docker git clone https://github.com/nextcloud/app_api.git app_api
docker exec -w /var/www/html/apps/app_api nextcloud-docker git checkout main
docker exec nextcloud-docker sudo -u www-data php occ app:enable app_api
docker exec nextcloud-docker sudo -u www-data php occ app_api:daemon:register \
harp_proxy "Harp Proxy with DSP" "docker-install" "http" "appapi-harp:8780" "http://nextcloud" \
--harp --harp_frp_address "appapi-harp:8782" --harp_shared_key "some_very_secure_password" \
--net=master_bridge --set-default
docker exec nextcloud-docker sudo -u www-data php occ app_api:daemon:list
docker exec nextcloud-docker ping -c 1 appapi-harp
docker exec nextcloud-docker ping -c 1 nextcloud
- name: Registering and enabling Skeleton ExApp
run: |
docker exec nextcloud-docker sudo -u www-data php occ app_api:app:register app-skeleton-python harp_proxy \
--info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml \
--wait-finish
- name: Docker inspect output
if: always()
run: docker inspect nc_app_app-skeleton-python
- name: Disable ExApp
run: |
docker exec nextcloud-docker sudo -u www-data php occ app_api:app:disable app-skeleton-python
- name: Copy NC log to host
if: always()
run: docker cp nextcloud-docker:/var/www/html/data/nextcloud.log nextcloud.log
- name: Check logs
run: |
grep -q 'Hello from app-skeleton-python :)' nextcloud.log || error
grep -q 'Bye bye from app-skeleton-python :(' nextcloud.log || error
- name: Save app and HaRP container info & logs
if: always()
run: |
docker inspect appapi-harp | json_pp > harp_bridge_no_tls_container.json
docker logs appapi-harp > harp_bridge_no_tls_container.log 2>&1
docker inspect nc_app_app-skeleton-python | json_pp > app_harp_bridge_no_tls_container.json
docker logs nc_app_app-skeleton-python > app_harp_bridge_no_tls_container.log 2>&1
- name: Unregister Skeleton & Daemon
run: |
docker exec nextcloud-docker sudo -u www-data php occ app_api:app:unregister app-skeleton-python
docker exec nextcloud-docker sudo -u www-data php occ app_api:daemon:unregister harp_proxy
- name: Show all logs
if: always()
run: tail -v -n +1 *container.json *.log
nc-host-harp-host:
runs-on: ubuntu-22.04
name: NC In Host (HaRP-Host network)
services:
postgres:
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest # zizmor: ignore[unpinned-images]
ports:
- 4444:5432/tcp
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpassword
POSTGRES_DB: nextcloud
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
steps:
- name: Checkout server
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: master
- name: Checkout AppAPI
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: nextcloud/app_api
ref: main
path: apps/app_api
- name: Checkout HaRP (this PR)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: harp
- name: Set up php 8.3
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: 8.3
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql, redis
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check composer file existence
id: check_composer
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v2
with:
files: apps/app_api/composer.json
- name: Set up dependencies
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/app_api
run: composer i
- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 \
--database-port=$DB_PORT --database-user=root --database-pass=rootpassword \
--admin-user admin --admin-pass admin
./occ config:system:set loglevel --value=0 --type=integer
./occ config:system:set debug --value=true --type=boolean
./occ config:system:set overwrite.cli.url --value http://127.0.0.1 --type=string
./occ app:enable --force app_api
- name: Build HaRP image (this PR)
working-directory: harp
run: docker build -t ghcr.io/nextcloud/nextcloud-appapi-harp:latest .
- name: Create HaRP container
run: |
cat apps/app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
docker run \
-e HP_SHARED_KEY="some_very_secure_password" \
-e NC_INSTANCE_URL="http://127.0.0.1" \
-e HP_LOG_LEVEL="debug" \
-v /var/run/docker.sock:/var/run/docker.sock \
--net host --name appapi-harp \
--restart unless-stopped \
-d ghcr.io/nextcloud/nextcloud-appapi-harp:latest
docker run --net host --name nextcloud --rm \
-v $(pwd)/apps/app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf:/etc/nginx/conf.d/default.conf:ro \
-d nginx
- name: Test deploy
run: |
PHP_CLI_SERVER_WORKERS=2 php -S 127.0.0.1:8080 &
./occ app_api:daemon:register \
harp_proxy "Harp Proxy with DSP" "docker-install" "http" "127.0.0.1:8780" "http://127.0.0.1" \
--harp --harp_frp_address "127.0.0.1:8782" --harp_shared_key "some_very_secure_password" \
--net host --set-default
./occ app_api:daemon:list
./occ app_api:app:register app-skeleton-python harp_proxy \
--info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml \
--wait-finish
./occ app_api:app:disable app-skeleton-python
- name: Check logs
run: |
grep -q 'Hello from app-skeleton-python :)' data/nextcloud.log || error
grep -q 'Bye bye from app-skeleton-python :(' data/nextcloud.log || error
- name: Save app and HaRP container info & logs
if: always()
run: |
docker inspect appapi-harp | json_pp > harp_host_container.json
docker logs appapi-harp > harp_host_container.log 2>&1
docker inspect nc_app_app-skeleton-python | json_pp > app_host_container.json
docker logs nc_app_app-skeleton-python > app_host_container.log 2>&1
- name: Unregister Skeleton & Daemon
run: |
./occ app_api:app:unregister app-skeleton-python
./occ app_api:daemon:unregister harp_proxy
- name: Test OCC commands(docker)
run: python3 apps/app_api/tests/test_occ_commands_docker.py
- name: Show all logs
if: always()
run: tail -v -n +1 *container.json *.log data/nextcloud.log
nc-host-manual-harp-host:
runs-on: ubuntu-22.04
name: NC In Host (Manual HaRP-Host network)
services:
postgres:
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest # zizmor: ignore[unpinned-images]
ports:
- 4444:5432/tcp
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpassword
POSTGRES_DB: nextcloud
options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5
steps:
- name: Checkout server
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: true
repository: nextcloud/server
ref: master
- name: Checkout AppAPI
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
repository: nextcloud/app_api
ref: main
path: apps/app_api
- name: Checkout HaRP (this PR)
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: harp
- name: Set up php 8.3
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: 8.3
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql, redis
coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check composer file existence
id: check_composer
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v2
with:
files: apps/app_api/composer.json
- name: Set up dependencies
if: steps.check_composer.outputs.files_exists == 'true'
working-directory: apps/app_api
run: composer i
- name: Set up Nextcloud
env:
DB_PORT: 4444
OC_PASS: password
run: |
mkdir data
./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 \
--database-port=$DB_PORT --database-user=root --database-pass=rootpassword \
--admin-user admin --admin-pass admin
./occ config:system:set loglevel --value=0 --type=integer
./occ config:system:set debug --value=true --type=boolean
./occ config:system:set overwrite.cli.url --value http://127.0.0.1 --type=string
./occ app:enable --force app_api
./occ user:add --password-from-env usr
- name: Build HaRP image (this PR)
working-directory: harp
run: docker build -t ghcr.io/nextcloud/nextcloud-appapi-harp:latest .
- name: Create HaRP and app container
run: |
cat apps/app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf
docker run \
-e HP_SHARED_KEY="some_very_secure_password" \
-e NC_INSTANCE_URL="http://127.0.0.1" \
-e HP_LOG_LEVEL="debug" \
-v /var/run/docker.sock:/var/run/docker.sock \
--net host --name appapi-harp \
--restart unless-stopped \
-d ghcr.io/nextcloud/nextcloud-appapi-harp:latest
docker run --net host --name nextcloud --rm \
-v $(pwd)/apps/app_api/tests/simple-nginx-NOT-FOR-PRODUCTION.conf:/etc/nginx/conf.d/default.conf:ro \
-d nginx
docker run --net host --name nc_app_app-skeleton-python \
-e AA_VERSION=4.0.0 \
-e APP_SECRET=12345 \
-e APP_ID=app-skeleton-python \
-e APP_DISPLAY_NAME="App Skeleton" \
-e APP_VERSION=3.0.1 \
-e APP_HOST=0.0.0.0 \
-e APP_PORT=23000 \
-e NEXTCLOUD_URL=http://127.0.0.1 \
--rm -d ghcr.io/nextcloud/app-skeleton-python:latest
- name: Test deploy
run: |
set -x
PHP_CLI_SERVER_WORKERS=2 php -S 127.0.0.1:8080 &
./occ app_api:daemon:register \
manual_install_harp "Harp Manual Install" "manual-install" "http" "127.0.0.1:8780" "http://127.0.0.1" \
--net host --harp --harp_frp_address "127.0.0.1:8782" --harp_shared_key "some_very_secure_password"
./occ app_api:daemon:list
./occ app_api:app:register app-skeleton-python manual_install_harp \
--json-info " \
{ \
\"id\": \"app-skeleton-python\", \
\"name\": \"App Skeleton\", \
\"daemon_config_name\": \"manual_install_harp\", \
\"version\": \"3.0.1\", \
\"secret\": \"12345\", \
\"port\": 23000, \
\"routes\": [ \
{ \
\"url\": \"^/public$\", \
\"verb\": \"GET\", \
\"access_level\": 0 \
}, \
{ \
\"url\": \"^/user$\", \
\"verb\": \"GET\", \
\"access_level\": 1 \
}, \
{ \
\"url\": \"^/admin$\", \
\"verb\": \"GET\", \
\"access_level\": 2 \
}, \
{ \
\"url\": \"^/$\", \
\"verb\": \"GET\", \
\"access_level\": 1 \
}, \
{ \
\"url\": \"^/ws$\", \
\"verb\": \"GET\", \
\"access_level\": 1 \
} \
] \
}" \
--wait-finish
function test_req() {
temp=$(mktemp)
curl -i -o $temp -w "%{http_code}" $2 http://127.0.0.1/exapps/app-skeleton-python/$1 | grep -q "$3" || {
echo "$1 :: $2 :: $3"
cat $temp
error
}
echo -e "\n\n-------------------------\n$1 :: $2 :: $3\n" | tee -a curl.log
cat $temp | tee -a curl.log
}
test_req public "--" 200
test_req public "-u usr:password" 200
test_req public "-u admin:admin" 200
test_req user "--" 403
test_req user "-u usr:password" 200
test_req user "-u admin:admin" 200
test_req admin "--" 403
test_req admin "-u usr:password" 403
test_req admin "-u admin:admin" 200
# clients get blacklisted for 5 bad requests for 5 minutes
sleep 301
test_req imaginary "--" 404
test_req imaginary "-u usr:password" 404
test_req imaginary "-u admin:admin" 404
./occ app_api:app:disable app-skeleton-python
- name: Check logs
run: |
grep -q 'Hello from app-skeleton-python :)' data/nextcloud.log || error
grep -q 'Bye bye from app-skeleton-python :(' data/nextcloud.log || error
- name: Save app and HaRP container info & logs
if: always()
run: |
docker inspect appapi-harp | json_pp > harp_host_container.json
docker logs appapi-harp > harp_host_container.log 2>&1
docker inspect nc_app_app-skeleton-python | json_pp > app_host_container.json
docker logs nc_app_app-skeleton-python > app_host_container.log 2>&1
- name: Unregister Skeleton & Daemon
run: |
./occ app_api:app:unregister app-skeleton-python
./occ app_api:daemon:unregister manual_install_harp
- name: Test OCC commands(docker)
run: python3 apps/app_api/tests/test_occ_commands_docker.py
- name: Show all logs
if: always()
run: tail -v -n +1 *container.json *.log data/nextcloud.log
tests-deploy-success:
permissions:
contents: none
runs-on: ubuntu-22.04
needs: [nc-docker-harp-bridge, nc-docker-harp-bridge-no-tls, nc-host-harp-host, nc-host-manual-harp-host]
name: Tests-Deploy-Docker-OK
steps:
- run: echo "Docker (HaRP) deploy tests passed successfully"