From dda08bc47368b9aba985d8cde1e7ead1aa7118de Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Fri, 26 Apr 2024 10:24:15 +0200 Subject: [PATCH] use stable27 and master Signed-off-by: tobiasKaminsky --- .../{configNC.sh => configNC_master.sh} | 0 .github/workflows/configNC_stable27.sh | 50 +++++++++++++++++++ .github/workflows/configServer.sh | 2 +- .github/workflows/garm.yml | 11 ++-- 4 files changed, 57 insertions(+), 6 deletions(-) rename .github/workflows/{configNC.sh => configNC_master.sh} (100%) create mode 100644 .github/workflows/configNC_stable27.sh diff --git a/.github/workflows/configNC.sh b/.github/workflows/configNC_master.sh similarity index 100% rename from .github/workflows/configNC.sh rename to .github/workflows/configNC_master.sh diff --git a/.github/workflows/configNC_stable27.sh b/.github/workflows/configNC_stable27.sh new file mode 100644 index 000000000..81a54520a --- /dev/null +++ b/.github/workflows/configNC_stable27.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +# Nextcloud Android Library +# +# SPDX-FileCopyrightText: 2024 Your Name +# SPDX-License-Identifier: MIT +# + +SERVER_VERSION="stable27" + +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash +source ~/.bashrc; nvm install node + +php /var/www/html/occ log:manage --level warning +OC_PASS=user1 php /var/www/html/occ user:add --password-from-env --display-name='User One' user1 +OC_PASS=user2 php /var/www/html/occ user:add --password-from-env --display-name='User Two' user2 +OC_PASS=user3 php /var/www/html/occ user:add --password-from-env --display-name='User Three' user3 +OC_PASS=test php /var/www/html/occ user:add --password-from-env --display-name='Test@Test' test@test +OC_PASS=test php /var/www/html/occ user:add --password-from-env --display-name='Test Spaces' 'test test' +php /var/www/html/occ user:setting user2 files quota 1G +php /var/www/html/occ group:add users +php /var/www/html/occ group:adduser users user1 +php /var/www/html/occ group:adduser users user2 +php /var/www/html/occ group:adduser users test +git clone -b $SERVER_VERSION https://github.com/nextcloud/activity.git /var/www/html/apps/activity/ +php /var/www/html/occ app:enable activity +git clone -b $SERVER_VERSION https://github.com/nextcloud/text.git /var/www/html/apps/text/ +php /var/www/html/occ app:enable text +git clone -b $SERVER_VERSION https://github.com/nextcloud/end_to_end_encryption/ /var/www/html/apps/end_to_end_encryption/ +php /var/www/html/occ app:enable end_to_end_encryption +git clone -b $SERVER_VERSION https://github.com/nextcloud/password_policy/ /var/www/html/apps/password_policy/ +php /var/www/html/occ app:enable password_policy +php /var/www/html/occ app:enable external +php /var/www/html/occ config:app:set external sites --value="{\"1\":{\"id\":1,\"name\":\"Nextcloud\",\"url\":\"https:\/\/www.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false},\"2\":{\"id\":2,\"name\":\"Forum\",\"url\":\"https:\/\/help.nextcloud.com\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"icon\":\"external.svg\",\"groups\":[],\"redirect\":false}}" +git clone -b $SERVER_VERSION https://github.com/nextcloud/files_lock.git /var/www/html/apps/files_lock/ +php /var/www/html/occ app:enable -f files_lock +git clone -b $SERVER_VERSION https://github.com/nextcloud/groupfolders.git /var/www/html/apps/groupfolders/ +php /var/www/html/occ app:enable -f groupfolders +php /var/www/html/occ groupfolders:create groupfolder +php /var/www/html/occ groupfolders:group 1 users +git clone -b $SERVER_VERSION https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/ +php /var/www/html/occ app:enable -f notifications +php /var/www/html/occ notification:generate test -d test +git clone -b $SERVER_VERSION https://github.com/nextcloud/photos.git /var/www/html/apps/photos/ +cd /var/www/html/apps/photos; composer install +php /var/www/html/occ app:enable -f photos +git clone https://github.com/nextcloud/assistant.git /var/www/html/apps/assistant/ +cd /var/www/html/apps/assistant; git checkout tags/v1.0.2; source ~/.bashrc; make +php /var/www/html/occ app:enable -f assistant +php /var/www/html/occ app:enable -f testing diff --git a/.github/workflows/configServer.sh b/.github/workflows/configServer.sh index 964f3ae8a..3697c0c81 100644 --- a/.github/workflows/configServer.sh +++ b/.github/workflows/configServer.sh @@ -11,4 +11,4 @@ mkdir /var/www/.nvm /var/www/.npm touch /var/www/.bashrc chown -R 33:33 /var/www/.nvm /var/www/.npm /var/www/.bashrc -/usr/local/bin/initnc.sh +BRANCH="$1" /usr/local/bin/initnc.sh diff --git a/.github/workflows/garm.yml b/.github/workflows/garm.yml index 0b9e51b22..b4f12e866 100644 --- a/.github/workflows/garm.yml +++ b/.github/workflows/garm.yml @@ -12,7 +12,7 @@ permissions: pull-requests: write jobs: - tests: + test-master: runs-on: ubuntu-22.04 # our own GARM does not yet support it services: server: @@ -23,6 +23,7 @@ jobs: strategy: fail-fast: false matrix: + server: [ master, stable27 ] scheme: [ Light ] color: [ blue ] api-level: [ 27 ] @@ -40,10 +41,10 @@ jobs: run: | docker cp .github/workflows/configServer.sh server:/tmp/ docker exec server chmod +x /tmp/configServer.sh - docker exec server /tmp/configServer.sh - docker cp .github/workflows/configNC.sh server:/tmp/ - docker exec server chmod +x /tmp/configNC.sh - docker exec --user www-data server /tmp/configNC.sh + docker exec server /tmp/configServer.sh ${{ matrix.server }} + docker cp .github/workflows/configNC_${{ matrix.server }}.sh server:/tmp/ + docker exec server chmod +x /tmp/configNC_${{ matrix.server }}.sh + docker exec --user www-data server /tmp/configNC_${{ matrix.server }}.sh docker exec server /usr/local/bin/run.sh - name: Enable KVM group perms