From 27710351b2605b5e799790a89d797c9b2a041728 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Wed, 13 May 2026 09:44:01 +0545 Subject: [PATCH 1/8] ci: automate upgrade testing Signed-off-by: nabim777 --- .github/scripts/self-hosted-app-store.sh | 89 ++++++++++ .github/workflows/appstore.yml | 201 +++++++++++++++++++++++ 2 files changed, 290 insertions(+) create mode 100644 .github/scripts/self-hosted-app-store.sh create mode 100644 .github/workflows/appstore.yml diff --git a/.github/scripts/self-hosted-app-store.sh b/.github/scripts/self-hosted-app-store.sh new file mode 100644 index 000000000..c5280e4d0 --- /dev/null +++ b/.github/scripts/self-hosted-app-store.sh @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: 2023-2024 Jankari Tech Pvt. Ltd. +# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS" +# SPDX-FileCopyrightText: 2023 Nextcloud GmbH +# SPDX-License-Identifier: AGPL-3.0-only +#!/usr/bin/env bash + +# This bash script is to register and publish the apps in self-hosted appstore. +# To run this script the self-hosted appstore instances must be up and running + +set -e + +# helper functions +log_error() { + echo -e "\e[31m$1\e[0m" +} + +log_info() { + echo -e "\e[37m$1\e[0m" +} + +log_success() { + echo -e "\e[32m$1\e[0m" +} + +if [ -z "$APP_ID" ] || [ -z "$APP_VERSION" ]; then + log_error "One or more required environment variables are missing: APP_ID, APP_VERSION" + exit 1 +fi + +registerApps() { + app_name=$1 + + register_app=$(curl -s -o /dev/null -w "%{http_code}" -X POST -uadmin:admin \ + http://localhost:8000/api/v1/apps \ + -H "Content-Type: application/json" \ + -d "{ + \"certificate\": \"${CERTIFICATE}\", + \"signature\": \"${SIGNATURE}\" + }") + if [[ ${register_app} == 201 ]]; then + log_success "\"${app_name}\" has been registered successfully!" + elif [[ ${register_app} == 204 ]]; then + log_info "\"${app_name}\" has been updated!" + elif [[ ${register_app} == 400 ]]; then + log_error "\"${app_name}\" contains invalid characters, the signature!" + exit 1 + else + log_error "Failed to register \"${app_name}\"" + exit 1 + fi +} + +publishApps() { + app_name=$1 + app_version=$2 + + register_app=$(curl -s -o /dev/null -w "%{http_code}" -X POST -uadmin:admin \ + http://localhost:8000/api/v1/apps/releases \ + -H "Content-Type: application/json" \ + -d "{ + \"download\":\"${DOWNLOAD_URL}\", + \"signature\": \"${SIGNATURE}\" + }") + if [[ ${register_app} == 200 ]]; then + log_success "\"${app_name} ${app_version}\" has been updated successfully!" + elif [[ ${register_app} == 201 ]]; then + log_success "\"${app_name} ${app_version}\" has been published successfully!" + else + log_error "Failed to publish \"${app_name} ${app_version}\"" + exit 1 + fi +} + +if [[ $APP_ID == "integration_openproject" ]]; then + # public certificate of the integration app for testing + CERTIFICATE="-----BEGIN CERTIFICATE-----\r\nMIIEEjCCAvoCAhF6MA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMjEwMzE4MTMwMTExWhcNMzEwNjI0MTMwMTExWjAiMSAwHgYD\r\nVQQDDBdpbnRlZ3JhdGlvbl9vcGVucHJvamVjdDCCAiIwDQYJKoZIhvcNAQEBBQAD\r\nggIPADCCAgoCggIBALn0ohZShOzR6UJAuN4IErLD5jenUWr83XnKCouC0qeXH6FI\r\nTNGTyOy\/KbDDRIoL1L20xYRl5UKwTbDye10ItUBhNcv72pJ2rDOSJrL84fqMxf00\r\nWdd\/APXJfNNqtgh1QTq9vvim9YCEu7JdeIhZK9ea89RPn47iSj7YijY78mGBfyfm\r\nqpHRYX\/QZAQcwjO2lE9soWUaZlrqu3mxTI218zmaqqcma4x3QakfsZeXZhQSU7D1\r\n6iYG8wy8IaYueJM5OoRRziBXoIfPpwYpEj4RhV1WME9jGhutyrHYg3jAdfvzsFVG\r\ngSVUP2ey1sq3HGZGbzWMBFLDGqfet0lGBIB0HTna1Zvu3ZnuK2uV3MObCmBBbBSs\r\n\/s8hyQTqWEbY2aqVoTBN5lyogwfL6pgZJFvhmtg21oHxBBqqAeQ+TZmWD62WorsX\r\n4F6Ahh1VKkmr5LkVvr2CfME0M1mj9s9gSc7ekXk1oHabH+wwgJV2ZhyezhXgWKgL\r\nUahjSRzkKqp5mbh27sg1kLCx9QNyXxaz8rnAcazGB00JzQlUmXg76cJ0v\/M3qihz\r\nQR5oju\/iMiUYKtqec9LU6wfvmGOOvtl2OFOD3ff69FPS2Km8He4pFWkSqw4DGivE\r\nIJLlgqLGIkWm+uNyocANtYqib52AYwJ\/nFMF6nzOvM1LoxHyJlFmudZRju2jAgMB\r\nAAEwDQYJKoZIhvcNAQELBQADggEBAD8mQtw0p3oh9fyOuyTmalHxoG9rLiV0Q2mz\r\n1T0jonVYN7YqSxS\/yWIQnZQ98x2nU93Be4G9VaLT0NZvRjnem2zemSVvuwp11GeK\r\ne80gJTaJjh8n1Z+gD6GU4C+LjWeiR75sd6Jcqfp3bqL6FGvSzIk3QQOfWuC03aXa\r\nFRleNH6rkMV30sWnXyocatculf7ThHZQMN1c0KuQFrd\/alQh\/+EyjBleLozkeC6G\r\n9IlE9DGRK0NUSvy7W68I7cVhR2ToE8oApdOJ1Cd6TpTYMRtvI2lQ4F7vF++ym0Lw\r\nMIxSI44hNeixh8Yn9rcy\/LqOUgl0niB5hfAiauRwHcOY5wf1hKE=\r\n-----END CERTIFICATE-----" + DOWNLOAD_URL="https://github.com/nextcloud/$APP_ID/releases/download/v$APP_VERSION/$APP_ID-$APP_VERSION.tar.gz" +elif [[ $APP_ID == "groupfolders" ]]; then + # public certificate of the groupfolders app for testing + CERTIFICATE="-----BEGIN CERTIFICATE-----\r\nMIIEBzCCAu8CAhBMMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQID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AadWN1O4\r\naVQ6Q2m6+1YocW4cI1WUiV5JkIXHZk3CZc7GxMmA6E\/STpNfDG+gp1G8ZFkVa7Dr\r\nfYBIvzu1ORvGdLygaiRGDdkc0Rsm49O41T6uKvmuQfBZqosSm4+pMA7MRIyLmi4n\r\nsM5F8ksDKX9dyA3SVufPgb4Qy8Hy85ory4GaPkdDgry3nDK1AU+ZmFyRXo5GfMsG\r\nIGWvIBP52FpCyb\/papXhtLzajVgEY4o0Asv\/E7UFymnOofTrBmZA\/+z3n59\/sZUT\r\nKclsORyDjRlH1yV02PDfgk8Hw2RR5fmaoP3h\r\n-----END CERTIFICATE-----" + DOWNLOAD_URL="https://github.com/nextcloud-releases/$APP_ID/releases/download/v$APP_VERSION/groupfolders-v$APP_VERSION.tar.gz" +else + log_error "Invalid app name: $APP_ID" + log_error "Please set the APP_ID environment variable to either \"integration_openproject\" or \"groupfolders\"" + exit 1 +fi + +registerApps "$APP_ID" +publishApps "$APP_ID" "$APP_VERSION" \ No newline at end of file diff --git a/.github/workflows/appstore.yml b/.github/workflows/appstore.yml new file mode 100644 index 000000000..d047ce126 --- /dev/null +++ b/.github/workflows/appstore.yml @@ -0,0 +1,201 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +name: Upgrade Testing + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + env: + DJANGO_SETTINGS_MODULE: nextcloudappstore.settings.development + services: + + database-mysql: + image: ghcr.io/nextcloud/continuous-integration-mariadb-10.5:latest + env: + MYSQL_ROOT_PASSWORD: 'nextcloud' + MYSQL_PASSWORD: 'nextcloud' + MYSQL_USER: 'nextcloud' + MYSQL_DATABASE: 'nextcloud' + ports: + - 3306:3306 + + steps: + - name: Checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + with: + path: integration_openproject + + - name: Setup NodeJS + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 + with: + node-version: 20 + + - name: Setup npm + run: npm i -g npm + + - name: Setup PHP + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d + with: + php-version: '8.2' + extensions: mbstring, intl, mysql, gd + ini-values: post_max_size=256M, max_execution_time=180 + coverage: xdebug + tools: php-cs-fixer, phpunit + + - name: Build nextcloud project + # if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) }} + # id: build_release + run: | + export DEBIAN_FRONTEND=noninteractive + echo "###### installing nextcloud" + mkdir ~/html + git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b stable29 ~/html/nextcloud + cd ~/html/nextcloud + git submodule update --init + mkdir -p data + # chown -R www-data:www-data config data apps + php occ maintenance:install \ + --database mysql \ + --database-name nextcloud \ + --database-host 127.0.0.1 \ + --database-user nextcloud \ + --database-pass nextcloud \ + --admin-user admin \ + --admin-pass admin + php occ maintenance:mode --off + sudo php -S localhost:80 -t ~/html/nextcloud & + + - name: Wait for Nextcloud server to be ready + run: | + if ! timeout 5m bash -c ' + until curl -s -f http://localhost/status.php | grep '"'"'"installed":true'"'"'; do + echo "[INFO] Waiting for server to be ready..." + sleep 10 + done + '; then + echo "[ERROR] Server not ready within 5 minutes." + exit 1 + fi + + + - name: Setup System dependencies for appstore + run: | + sudo apt install -y \ + python3-venv \ + python3-wheel \ + libxslt-dev \ + libxml2-dev \ + libz-dev \ + libpq-dev \ + build-essential \ + python3-dev \ + python3-setuptools \ + gettext \ + libssl-dev \ + libffi-dev \ + nodejs \ + yarn + + - name: Checkout appstore + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + with: + repository: nextcloud/appstore + path: appstore + + - name: Install Appstore + run: | + cd appstore + python3 -m venv venv + source venv/bin/activate + pip install poetry==1.8.2 + make dev-setup + python manage.py runserver & + + - name: Check for Appstore + run: | + cd appstore + status=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:8000) + if [ "$status" -eq 200 ]; then + echo "OK" + else + echo "FAILED (status: $status)" + fi + + - name: Register and publish integration_openproject apps + env: + APP_ID: integration_openproject + APP_VERSION: 2.9.2 + SIGNATURE: signature1 + run: | + cd integration_openproject + bash ./.github/scripts/self-hosted-app-store.sh + + - name: Register and publish groupfolders apps + env: + APP_ID: groupfolders + APP_VERSION: 17.0.15 + SIGNATURE: signature1 + run: | + cd integration_openproject + bash ./.github/scripts/self-hosted-app-store.sh + + - name: Configure Nextcloud for testing + run: | + # making the signature verification always pass for testing + # by making the $verified variable true in Installer.php + sed -i.bak 's/$verified = .*/$verified = true;/' /home/runner/html/nextcloud/lib/private/Installer.php || { + echo "::error::Failed to patch Installer.php with sed" + exit 1 + } + cd ~/html/nextcloud + php occ config:system:set appstoreurl --value http://localhost:8000/api/v1 + php occ config:system:set allow_local_remote_servers --value true + php occ app:install integration_openproject + php occ app:install groupfolders + + - name: Register and publish next release of the app + env: + APP_ID: integration_openproject + APP_VERSION: 2.10.0 + SIGNATURE: signature2 + run: | + cd integration_openproject + bash ./.github/scripts/self-hosted-app-store.sh + + - name: upgrade apps + run: | + cd ~/html/nextcloud + # latest data didn't get fetched properly, so we need to clear the appstore cache + echo "" > ~/html/nextcloud/data/appdata_*/appstore/apps.json + php occ app:update --allow-unstable integration_openproject + + - name: API Tests + env: + NEXTCLOUD_BASE_URL: http://localhost + run: | + cd integration_openproject + # build apps + make + # Run API tests + make api-test + # make api-test FEATURE_PATH=tests/acceptance/features/api/capabilities.feature + + # - name: Setup Debug Session + # uses: csexton/debugger-action@master + + # - name: Configure Nextcloud for testing + # run: | + # ls -l + + # cd ~/html/nextcloud + # ls -l + # php occ app:install integration_openproject \ No newline at end of file From 6c470ce82d240fff9600b1376ba1b8ea49583dbf Mon Sep 17 00:00:00 2001 From: nabim777 Date: Wed, 13 May 2026 10:14:11 +0545 Subject: [PATCH 2/8] ci: use the specific branch Signed-off-by: nabim777 --- .github/workflows/appstore.yml | 15 +++++++-------- .github/workflows/ci-workflow.yml | 26 +++++++++++++------------- .github/workflows/reuse.yml | 2 +- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/appstore.yml b/.github/workflows/appstore.yml index d047ce126..71a850d9e 100644 --- a/.github/workflows/appstore.yml +++ b/.github/workflows/appstore.yml @@ -33,6 +33,8 @@ jobs: uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 with: path: integration_openproject + fetch-tags: true + ref: v2.9.2 - name: Setup NodeJS uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 @@ -52,8 +54,6 @@ jobs: tools: php-cs-fixer, phpunit - name: Build nextcloud project - # if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) }} - # id: build_release run: | export DEBIAN_FRONTEND=noninteractive echo "###### installing nextcloud" @@ -136,8 +136,8 @@ jobs: APP_VERSION: 2.9.2 SIGNATURE: signature1 run: | - cd integration_openproject - bash ./.github/scripts/self-hosted-app-store.sh + wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh + bash ./self-hosted-app-store.sh - name: Register and publish groupfolders apps env: @@ -145,8 +145,7 @@ jobs: APP_VERSION: 17.0.15 SIGNATURE: signature1 run: | - cd integration_openproject - bash ./.github/scripts/self-hosted-app-store.sh + bash ./self-hosted-app-store.sh - name: Configure Nextcloud for testing run: | @@ -157,6 +156,7 @@ jobs: exit 1 } cd ~/html/nextcloud + php occ config:system:set ratelimit.protection.enabled --value false --type bool php occ config:system:set appstoreurl --value http://localhost:8000/api/v1 php occ config:system:set allow_local_remote_servers --value true php occ app:install integration_openproject @@ -168,8 +168,7 @@ jobs: APP_VERSION: 2.10.0 SIGNATURE: signature2 run: | - cd integration_openproject - bash ./.github/scripts/self-hosted-app-store.sh + bash ./self-hosted-app-store.sh - name: upgrade apps run: | diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 644f63ff7..600b89340 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -2,19 +2,19 @@ # SPDX-License-Identifier: AGPL-3.0-or-later name: CI -on: - push: - branches: - - 'master' - pull_request: - paths-ignore: - - '**.md' - - '**.txt' - - '**.sh' - - 'dev/**' - - 'l10n/**' - - 'img/**' - - 'docker-compose*' +# on: +# push: +# branches: +# - 'master' +# pull_request: +# paths-ignore: +# - '**.md' +# - '**.txt' +# - '**.sh' +# - 'dev/**' +# - 'l10n/**' +# - 'img/**' +# - 'docker-compose*' concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 949d2aa88..ee13d46a6 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -9,7 +9,7 @@ name: REUSE Compliance Check -on: [pull_request] +# on: [pull_request] permissions: contents: read From 183de4e7e26b877a647251beebf4dba44644ee9f Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 14 May 2026 09:20:33 +0545 Subject: [PATCH 3/8] ci: enabling other apps from officail appstore Signed-off-by: nabim777 --- .github/scripts/self-hosted-app-store.sh | 18 +++--------- .github/workflows/appstore.yml | 35 ++++++++++++++++++------ 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/.github/scripts/self-hosted-app-store.sh b/.github/scripts/self-hosted-app-store.sh index c5280e4d0..599a6f34c 100644 --- a/.github/scripts/self-hosted-app-store.sh +++ b/.github/scripts/self-hosted-app-store.sh @@ -58,7 +58,7 @@ publishApps() { http://localhost:8000/api/v1/apps/releases \ -H "Content-Type: application/json" \ -d "{ - \"download\":\"${DOWNLOAD_URL}\", + \"download\":\"https://github.com/nextcloud/$APP_ID/releases/download/v$APP_VERSION/$APP_ID-$APP_VERSION.tar.gz\", \"signature\": \"${SIGNATURE}\" }") if [[ ${register_app} == 200 ]]; then @@ -71,19 +71,9 @@ publishApps() { fi } -if [[ $APP_ID == "integration_openproject" ]]; then - # public certificate of the integration app for test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Yqib52AYwJ\/nFMF6nzOvM1LoxHyJlFmudZRju2jAgMB\r\nAAEwDQYJKoZIhvcNAQELBQADggEBAD8mQtw0p3oh9fyOuyTmalHxoG9rLiV0Q2mz\r\n1T0jonVYN7YqSxS\/yWIQnZQ98x2nU93Be4G9VaLT0NZvRjnem2zemSVvuwp11GeK\r\ne80gJTaJjh8n1Z+gD6GU4C+LjWeiR75sd6Jcqfp3bqL6FGvSzIk3QQOfWuC03aXa\r\nFRleNH6rkMV30sWnXyocatculf7ThHZQMN1c0KuQFrd\/alQh\/+EyjBleLozkeC6G\r\n9IlE9DGRK0NUSvy7W68I7cVhR2ToE8oApdOJ1Cd6TpTYMRtvI2lQ4F7vF++ym0Lw\r\nMIxSI44hNeixh8Yn9rcy\/LqOUgl0niB5hfAiauRwHcOY5wf1hKE=\r\n-----END CERTIFICATE-----" - DOWNLOAD_URL="https://github.com/nextcloud/$APP_ID/releases/download/v$APP_VERSION/$APP_ID-$APP_VERSION.tar.gz" -elif [[ $APP_ID == "groupfolders" ]]; then - # public certificate of the groupfolders app for testing - CERTIFICATE="-----BEGIN CERTIFICATE-----\r\nMIIEBzCCAu8CAhBMMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMTcwNDI2MTc0NDAwWhcNMjcwODAyMTc0NDAwWjAXMRUwEwYD\r\nVQQDEwxncm91cGZvbGRlcnMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC\r\nAQDa7N4NmUyKgT6Ovo5EXdXV7eBFaCRWKvgnwgpmpYCdSdPpprBaoyKka5FWi2Zo\r\nB2QCDQtmRuZ9RpiAblvLGeIYI1hNd1O6632U5wLtZFa2WsueV8lFGiXIy+r7jK8R\r\nc56tmeclKP4RImk4yydec89bB2\/MmVYaNkNqueckg239C1Nt0GfmmQaTlANvGVAe\r\ndb0+Y+\/YBSHSSE8TDf6n3kFR5RIWspbXv3mwFOaTTxtR+hi01eaPWnGnRz2w1+Wn\r\nXJQVBzLGuQI\/GdYZItbZ5PgVuHMcvIc6elJENiUzqli3y6VbA9posefkPAph75ny\r\nqa+B7RppiE+5d4er8es04azEKjlcmGi6zkosQEikeT01zIiiDjsvsW1gFd5KQ+OX\r\nfUsuL2R8ymX6btj5Ee6lAK7qfCgQfKEIjl5oz48+h46ERe\/NToZsNS\/g5sO5UfG5\r\n+URERPuMteaF6bKMZlHLEVco8RUttocfHGAHuA4PIWgR\/XKLdJ\/c1VsjsvMak90u\r\nfKR6vkGFizGKHQG+2ZXJQuBAih6lQ7Lbd\/v5NWIMiYHZG990EXc6nUmKUcepTl9P\r\n6CfFq4LyX4jEN8KkuLsXk5jMgDf5LjNNvqOXH\/dbynUrjUb+mCMLCq6lvp3SD39m\r\nw1LjNZe6TDsZmPN\/+XoeG88zvidGszy7dVbO2HDcDssnWwIDAQABMA0GCSqGSIb3\r\nDQEBCwUAA4IBAQBqTrXOxSRaqdcBPUfuwWTPs+OzJjJ77DXhQKP3zMMVAadWN1O4\r\naVQ6Q2m6+1YocW4cI1WUiV5JkIXHZk3CZc7GxMmA6E\/STpNfDG+gp1G8ZFkVa7Dr\r\nfYBIvzu1ORvGdLygaiRGDdkc0Rsm49O41T6uKvmuQfBZqosSm4+pMA7MRIyLmi4n\r\nsM5F8ksDKX9dyA3SVufPgb4Qy8Hy85ory4GaPkdDgry3nDK1AU+ZmFyRXo5GfMsG\r\nIGWvIBP52FpCyb\/papXhtLzajVgEY4o0Asv\/E7UFymnOofTrBmZA\/+z3n59\/sZUT\r\nKclsORyDjRlH1yV02PDfgk8Hw2RR5fmaoP3h\r\n-----END CERTIFICATE-----" - DOWNLOAD_URL="https://github.com/nextcloud-releases/$APP_ID/releases/download/v$APP_VERSION/groupfolders-v$APP_VERSION.tar.gz" -else - log_error "Invalid app name: $APP_ID" - log_error "Please set the APP_ID environment variable to either \"integration_openproject\" or \"groupfolders\"" - exit 1 -fi +# public certificate of the integration app for testing +CERTIFICATE="-----BEGIN CERTIFICATE-----\r\nMIIEEjCCAvoCAhF6MA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMjEwMzE4MTMwMTExWhcNMzEwNjI0MTMwMTExWjAiMSAwHgYD\r\nVQQDDBdpbnRlZ3JhdGlvbl9vcGVucHJvamVjdDCCAiIwDQYJKoZIhvcNAQEBBQAD\r\nggIPADCCAgoCggIBALn0ohZShOzR6UJAuN4IErLD5jenUWr83XnKCouC0qeXH6FI\r\nTNGTyOy\/KbDDRIoL1L20xYRl5UKwTbDye10ItUBhNcv72pJ2rDOSJrL84fqMxf00\r\nWdd\/APXJfNNqtgh1QTq9vvim9YCEu7JdeIhZK9ea89RPn47iSj7YijY78mGBfyfm\r\nqpHRYX\/QZAQcwjO2lE9soWUaZlrqu3mxTI218zmaqqcma4x3QakfsZeXZhQSU7D1\r\n6iYG8wy8IaYueJM5OoRRziBXoIfPpwYpEj4RhV1WME9jGhutyrHYg3jAdfvzsFVG\r\ngSVUP2ey1sq3HGZGbzWMBFLDGqfet0lGBIB0HTna1Zvu3ZnuK2uV3MObCmBBbBSs\r\n\/s8hyQTqWEbY2aqVoTBN5lyogwfL6pgZJFvhmtg21oHxBBqqAeQ+TZmWD62WorsX\r\n4F6Ahh1VKkmr5LkVvr2CfME0M1mj9s9gSc7ekXk1oHabH+wwgJV2ZhyezhXgWKgL\r\nUahjSRzkKqp5mbh27sg1kLCx9QNyXxaz8rnAcazGB00JzQlUmXg76cJ0v\/M3qihz\r\nQR5oju\/iMiUYKtqec9LU6wfvmGOOvtl2OFOD3ff69FPS2Km8He4pFWkSqw4DGivE\r\nIJLlgqLGIkWm+uNyocANtYqib52AYwJ\/nFMF6nzOvM1LoxHyJlFmudZRju2jAgMB\r\nAAEwDQYJKoZIhvcNAQELBQADggEBAD8mQtw0p3oh9fyOuyTmalHxoG9rLiV0Q2mz\r\n1T0jonVYN7YqSxS\/yWIQnZQ98x2nU93Be4G9VaLT0NZvRjnem2zemSVvuwp11GeK\r\ne80gJTaJjh8n1Z+gD6GU4C+LjWeiR75sd6Jcqfp3bqL6FGvSzIk3QQOfWuC03aXa\r\nFRleNH6rkMV30sWnXyocatculf7ThHZQMN1c0KuQFrd\/alQh\/+EyjBleLozkeC6G\r\n9IlE9DGRK0NUSvy7W68I7cVhR2ToE8oApdOJ1Cd6TpTYMRtvI2lQ4F7vF++ym0Lw\r\nMIxSI44hNeixh8Yn9rcy\/LqOUgl0niB5hfAiauRwHcOY5wf1hKE=\r\n-----END CERTIFICATE-----" +SIGNATURE="signature" registerApps "$APP_ID" publishApps "$APP_ID" "$APP_VERSION" \ No newline at end of file diff --git a/.github/workflows/appstore.yml b/.github/workflows/appstore.yml index 71a850d9e..d9e11719c 100644 --- a/.github/workflows/appstore.yml +++ b/.github/workflows/appstore.yml @@ -34,8 +34,15 @@ jobs: with: path: integration_openproject fetch-tags: true - ref: v2.9.2 + ref: v2.10.0 + - name: Checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + with: + repository: nextcloud/activity + ref: stable29 + path: activity + - name: Setup NodeJS uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 with: @@ -139,15 +146,24 @@ jobs: wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh bash ./self-hosted-app-store.sh - - name: Register and publish groupfolders apps - env: - APP_ID: groupfolders - APP_VERSION: 17.0.15 - SIGNATURE: signature1 + # - name: Register and publish groupfolders apps + # env: + # APP_ID: groupfolders + # APP_VERSION: 17.0.15 + # SIGNATURE: signature1 + # run: | + # bash ./self-hosted-app-store.sh + + # - name: Setup Debug Session + # uses: csexton/debugger-action@master + + - name: Enable other apps from official app store run: | - bash ./self-hosted-app-store.sh + cp -R activity ~/html/nextcloud/apps + cd ~/html/nextcloud + php occ app:enable oidc user_oidc groupfolders activity - - name: Configure Nextcloud for testing + - name: Enable integration_openproject app from self-hosted app store run: | # making the signature verification always pass for testing # by making the $verified variable true in Installer.php @@ -155,12 +171,13 @@ jobs: echo "::error::Failed to patch Installer.php with sed" exit 1 } + # latest data didn't get fetched properly, so we need to clear the appstore cache + echo "" > ~/html/nextcloud/data/appdata_*/appstore/apps.json cd ~/html/nextcloud php occ config:system:set ratelimit.protection.enabled --value false --type bool php occ config:system:set appstoreurl --value http://localhost:8000/api/v1 php occ config:system:set allow_local_remote_servers --value true php occ app:install integration_openproject - php occ app:install groupfolders - name: Register and publish next release of the app env: From c0e782f9077798b70513bc003a512ffc15aa71d2 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 14 May 2026 11:56:44 +0545 Subject: [PATCH 4/8] ci: add matrix Signed-off-by: nabim777 --- .github/workflows/appstore.yml | 84 +++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 33 deletions(-) diff --git a/.github/workflows/appstore.yml b/.github/workflows/appstore.yml index d9e11719c..9a605fb8b 100644 --- a/.github/workflows/appstore.yml +++ b/.github/workflows/appstore.yml @@ -9,15 +9,56 @@ name: Upgrade Testing -on: [pull_request] +on: + pull_request: + # workflow_call: + # inputs: + # nextcloud_versions: + # required: false + # type: string + # default: "31 32" + # php_versions: + # required: false + # type: string + # default: "8.2 8.3" + # previous_app_version: + # required: false + # type: string + # default: "2.9.2" + # upgrade_app_version: + # required: false + # type: string + # default: "2.10.0" jobs: - build: + create-matrix: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + + - name: Create matrix + id: create-matrix + env: + NEXTCLOUD_VERSIONS: ${{ inputs.nextcloud_versions }} + PHP_VERSIONS: ${{ inputs.php_versions }} + run: | + MATRIX=$(./.github/scripts/generate-matrix.sh) + echo "matrix={\"include\": [$MATRIX]}" >> $GITHUB_OUTPUT + outputs: + matrix: ${{ steps.create-matrix.outputs.matrix }} + + upgrade-test: + name: Upgrade Testing + needs: create-matrix + if: ${{ success() }} + strategy: + matrix: ${{ fromJson(needs.create-matrix.outputs.matrix) }} runs-on: ubuntu-latest + env: DJANGO_SETTINGS_MODULE: nextcloudappstore.settings.development services: - database-mysql: image: ghcr.io/nextcloud/continuous-integration-mariadb-10.5:latest env: @@ -34,13 +75,13 @@ jobs: with: path: integration_openproject fetch-tags: true - ref: v2.10.0 + ref: v${{ inputs.upgrade_app_version }} - name: Checkout uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 with: repository: nextcloud/activity - ref: stable29 + ref: stable${{ matrix.nextcloud_version }} path: activity - name: Setup NodeJS @@ -54,7 +95,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d with: - php-version: '8.2' + php-version: ${{ matrix.php_version }} extensions: mbstring, intl, mysql, gd ini-values: post_max_size=256M, max_execution_time=180 coverage: xdebug @@ -65,7 +106,7 @@ jobs: export DEBIAN_FRONTEND=noninteractive echo "###### installing nextcloud" mkdir ~/html - git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b stable29 ~/html/nextcloud + git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b stable${{ matrix.nextcloud_version }} ~/html/nextcloud cd ~/html/nextcloud git submodule update --init mkdir -p data @@ -140,23 +181,12 @@ jobs: - name: Register and publish integration_openproject apps env: APP_ID: integration_openproject - APP_VERSION: 2.9.2 + APP_VERSION: ${{ inputs.previous_app_version }} SIGNATURE: signature1 run: | wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh bash ./self-hosted-app-store.sh - # - name: Register and publish groupfolders apps - # env: - # APP_ID: groupfolders - # APP_VERSION: 17.0.15 - # SIGNATURE: signature1 - # run: | - # bash ./self-hosted-app-store.sh - - # - name: Setup Debug Session - # uses: csexton/debugger-action@master - - name: Enable other apps from official app store run: | cp -R activity ~/html/nextcloud/apps @@ -182,7 +212,7 @@ jobs: - name: Register and publish next release of the app env: APP_ID: integration_openproject - APP_VERSION: 2.10.0 + APP_VERSION: ${{ inputs.upgrade_app_version }} SIGNATURE: signature2 run: | bash ./self-hosted-app-store.sh @@ -202,16 +232,4 @@ jobs: # build apps make # Run API tests - make api-test - # make api-test FEATURE_PATH=tests/acceptance/features/api/capabilities.feature - - # - name: Setup Debug Session - # uses: csexton/debugger-action@master - - # - name: Configure Nextcloud for testing - # run: | - # ls -l - - # cd ~/html/nextcloud - # ls -l - # php occ app:install integration_openproject \ No newline at end of file + make api-test \ No newline at end of file From 3234322ca3bbbd5e036cd7036aa5d50646afcaee Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 14 May 2026 12:45:47 +0545 Subject: [PATCH 5/8] ci: use env Signed-off-by: nabim777 --- .github/workflows/appstore.yml | 39 ++++++++++------------------------ 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/.github/workflows/appstore.yml b/.github/workflows/appstore.yml index 9a605fb8b..a73c2ee79 100644 --- a/.github/workflows/appstore.yml +++ b/.github/workflows/appstore.yml @@ -9,26 +9,7 @@ name: Upgrade Testing -on: - pull_request: - # workflow_call: - # inputs: - # nextcloud_versions: - # required: false - # type: string - # default: "31 32" - # php_versions: - # required: false - # type: string - # default: "8.2 8.3" - # previous_app_version: - # required: false - # type: string - # default: "2.9.2" - # upgrade_app_version: - # required: false - # type: string - # default: "2.10.0" +on: [pull_request] jobs: create-matrix: @@ -40,8 +21,8 @@ jobs: - name: Create matrix id: create-matrix env: - NEXTCLOUD_VERSIONS: ${{ inputs.nextcloud_versions }} - PHP_VERSIONS: ${{ inputs.php_versions }} + NEXTCLOUD_VERSIONS: "29 30" + PHP_VERSIONS: "8.2 8.3" run: | MATRIX=$(./.github/scripts/generate-matrix.sh) echo "matrix={\"include\": [$MATRIX]}" >> $GITHUB_OUTPUT @@ -58,6 +39,8 @@ jobs: env: DJANGO_SETTINGS_MODULE: nextcloudappstore.settings.development + PREVIOUS_APP_VERSION: 2.9.2 + UPGRADE_APP_VERSION: 2.10.0 services: database-mysql: image: ghcr.io/nextcloud/continuous-integration-mariadb-10.5:latest @@ -75,13 +58,13 @@ jobs: with: path: integration_openproject fetch-tags: true - ref: v${{ inputs.upgrade_app_version }} + ref: v${{ env.UPGRADE_APP_VERSION }} - name: Checkout uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 with: repository: nextcloud/activity - ref: stable${{ matrix.nextcloud_version }} + ref: ${{ matrix.nextcloudVersion }} path: activity - name: Setup NodeJS @@ -95,7 +78,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d with: - php-version: ${{ matrix.php_version }} + php-version: ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }} extensions: mbstring, intl, mysql, gd ini-values: post_max_size=256M, max_execution_time=180 coverage: xdebug @@ -106,7 +89,7 @@ jobs: export DEBIAN_FRONTEND=noninteractive echo "###### installing nextcloud" mkdir ~/html - git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b stable${{ matrix.nextcloud_version }} ~/html/nextcloud + git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloudVersion }} ~/html/nextcloud cd ~/html/nextcloud git submodule update --init mkdir -p data @@ -181,7 +164,7 @@ jobs: - name: Register and publish integration_openproject apps env: APP_ID: integration_openproject - APP_VERSION: ${{ inputs.previous_app_version }} + APP_VERSION: ${{ env.PREVIOUS_APP_VERSION }} SIGNATURE: signature1 run: | wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh @@ -212,7 +195,7 @@ jobs: - name: Register and publish next release of the app env: APP_ID: integration_openproject - APP_VERSION: ${{ inputs.upgrade_app_version }} + APP_VERSION: ${{ env.UPGRADE_APP_VERSION }} SIGNATURE: signature2 run: | bash ./self-hosted-app-store.sh From c696b82b7019503c6ab8f632fa0ebff344b7d14b Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 14 May 2026 13:07:38 +0545 Subject: [PATCH 6/8] ci: remove some env Signed-off-by: nabim777 --- .github/scripts/self-hosted-app-store.sh | 11 +++++------ .github/workflows/appstore.yml | 4 ---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/scripts/self-hosted-app-store.sh b/.github/scripts/self-hosted-app-store.sh index 599a6f34c..1f6a18474 100644 --- a/.github/scripts/self-hosted-app-store.sh +++ b/.github/scripts/self-hosted-app-store.sh @@ -22,8 +22,8 @@ log_success() { echo -e "\e[32m$1\e[0m" } -if [ -z "$APP_ID" ] || [ -z "$APP_VERSION" ]; then - log_error "One or more required environment variables are missing: APP_ID, APP_VERSION" +if [[ -z "$APP_VERSION" ]]; then + log_error "Environment variables APP_VERSION is missing." exit 1 fi @@ -35,7 +35,7 @@ registerApps() { -H "Content-Type: application/json" \ -d "{ \"certificate\": \"${CERTIFICATE}\", - \"signature\": \"${SIGNATURE}\" + \"signature\": \"signature\" }") if [[ ${register_app} == 201 ]]; then log_success "\"${app_name}\" has been registered successfully!" @@ -59,7 +59,7 @@ publishApps() { -H "Content-Type: application/json" \ -d "{ \"download\":\"https://github.com/nextcloud/$APP_ID/releases/download/v$APP_VERSION/$APP_ID-$APP_VERSION.tar.gz\", - \"signature\": \"${SIGNATURE}\" + \"signature\": \"signature\" }") if [[ ${register_app} == 200 ]]; then log_success "\"${app_name} ${app_version}\" has been updated successfully!" @@ -73,7 +73,6 @@ publishApps() { # public certificate of the integration app for testing CERTIFICATE="-----BEGIN CERTIFICATE-----\r\nMIIEEjCCAvoCAhF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EwDQYJKoZIhvcNAQELBQADggEBAD8mQtw0p3oh9fyOuyTmalHxoG9rLiV0Q2mz\r\n1T0jonVYN7YqSxS\/yWIQnZQ98x2nU93Be4G9VaLT0NZvRjnem2zemSVvuwp11GeK\r\ne80gJTaJjh8n1Z+gD6GU4C+LjWeiR75sd6Jcqfp3bqL6FGvSzIk3QQOfWuC03aXa\r\nFRleNH6rkMV30sWnXyocatculf7ThHZQMN1c0KuQFrd\/alQh\/+EyjBleLozkeC6G\r\n9IlE9DGRK0NUSvy7W68I7cVhR2ToE8oApdOJ1Cd6TpTYMRtvI2lQ4F7vF++ym0Lw\r\nMIxSI44hNeixh8Yn9rcy\/LqOUgl0niB5hfAiauRwHcOY5wf1hKE=\r\n-----END CERTIFICATE-----" -SIGNATURE="signature" - +APP_ID="integration_openproject" registerApps "$APP_ID" publishApps "$APP_ID" "$APP_VERSION" \ No newline at end of file diff --git a/.github/workflows/appstore.yml b/.github/workflows/appstore.yml index a73c2ee79..0abc13c2d 100644 --- a/.github/workflows/appstore.yml +++ b/.github/workflows/appstore.yml @@ -163,9 +163,7 @@ jobs: - name: Register and publish integration_openproject apps env: - APP_ID: integration_openproject APP_VERSION: ${{ env.PREVIOUS_APP_VERSION }} - SIGNATURE: signature1 run: | wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh bash ./self-hosted-app-store.sh @@ -194,9 +192,7 @@ jobs: - name: Register and publish next release of the app env: - APP_ID: integration_openproject APP_VERSION: ${{ env.UPGRADE_APP_VERSION }} - SIGNATURE: signature2 run: | bash ./self-hosted-app-store.sh From be7bdec435546c2ecbb8dbfc9cd4381d7d5b1fdc Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 14 May 2026 14:10:00 +0545 Subject: [PATCH 7/8] ci: renaming the workflows Signed-off-by: nabim777 --- .github/workflows/{appstore.yml => upgrade-testing.yml} | 1 - 1 file changed, 1 deletion(-) rename .github/workflows/{appstore.yml => upgrade-testing.yml} (99%) diff --git a/.github/workflows/appstore.yml b/.github/workflows/upgrade-testing.yml similarity index 99% rename from .github/workflows/appstore.yml rename to .github/workflows/upgrade-testing.yml index 0abc13c2d..b61155199 100644 --- a/.github/workflows/appstore.yml +++ b/.github/workflows/upgrade-testing.yml @@ -93,7 +93,6 @@ jobs: cd ~/html/nextcloud git submodule update --init mkdir -p data - # chown -R www-data:www-data config data apps php occ maintenance:install \ --database mysql \ --database-name nextcloud \ From df470d9e21ce2ebfac64ce9178de5bca830af6b5 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Fri, 15 May 2026 09:30:29 +0545 Subject: [PATCH 8/8] ci: review addresses Signed-off-by: nabim777 --- ...nd-publish-app-to-self-hosted-appstore.sh} | 20 +++++++--------- .github/workflows/upgrade-testing.yml | 23 +++++++------------ 2 files changed, 16 insertions(+), 27 deletions(-) rename .github/scripts/{self-hosted-app-store.sh => register-and-publish-app-to-self-hosted-appstore.sh} (87%) diff --git a/.github/scripts/self-hosted-app-store.sh b/.github/scripts/register-and-publish-app-to-self-hosted-appstore.sh similarity index 87% rename from .github/scripts/self-hosted-app-store.sh rename to .github/scripts/register-and-publish-app-to-self-hosted-appstore.sh index 1f6a18474..4edaede5c 100644 --- a/.github/scripts/self-hosted-app-store.sh +++ b/.github/scripts/register-and-publish-app-to-self-hosted-appstore.sh @@ -1,11 +1,5 @@ -# SPDX-FileCopyrightText: 2023-2024 Jankari Tech Pvt. Ltd. -# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS" -# SPDX-FileCopyrightText: 2023 Nextcloud GmbH +# SPDX-FileCopyrightText: 2026 Jankari Tech Pvt. Ltd. # SPDX-License-Identifier: AGPL-3.0-only -#!/usr/bin/env bash - -# This bash script is to register and publish the apps in self-hosted appstore. -# To run this script the self-hosted appstore instances must be up and running set -e @@ -27,11 +21,16 @@ if [[ -z "$APP_VERSION" ]]; then exit 1 fi +APPSTORE_BASE_URL="${APPSTORE_BASE_URL:-http://localhost:8000}" +# public certificate of the integration app for testing +CERTIFICATE="-----BEGIN CERTIFICATE-----\r\nMIIEEjCCAvoCAhF6MA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI\r\nMTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB\r\ndXRob3JpdHkwHhcNMjEwMzE4MTMwMTExWhcNMzEwNjI0MTMwMTExWjAiMSAwHgYD\r\nVQQDDBdpbnRlZ3JhdGlvbl9vcGVucHJvamVjdDCCAiIwDQYJKoZIhvcNAQEBBQAD\r\nggIPADCCAgoCggIBALn0ohZShOzR6UJAuN4IErLD5jenUWr83XnKCouC0qeXH6FI\r\nTNGTyOy\/KbDDRIoL1L20xYRl5UKwTbDye10ItUBhNcv72pJ2rDOSJrL84fqMxf00\r\nWdd\/APXJfNNqtgh1QTq9vvim9YCEu7JdeIhZK9ea89RPn47iSj7YijY78mGBfyfm\r\nqpHRYX\/QZAQcwjO2lE9soWUaZlrqu3mxTI218zmaqqcma4x3QakfsZeXZhQSU7D1\r\n6iYG8wy8IaYueJM5OoRRziBXoIfPpwYpEj4RhV1WME9jGhutyrHYg3jAdfvzsFVG\r\ngSVUP2ey1sq3HGZGbzWMBFLDGqfet0lGBIB0HTna1Zvu3ZnuK2uV3MObCmBBbBSs\r\n\/s8hyQTqWEbY2aqVoTBN5lyogwfL6pgZJFvhmtg21oHxBBqqAeQ+TZmWD62WorsX\r\n4F6Ahh1VKkmr5LkVvr2CfME0M1mj9s9gSc7ekXk1oHabH+wwgJV2ZhyezhXgWKgL\r\nUahjSRzkKqp5mbh27sg1kLCx9QNyXxaz8rnAcazGB00JzQlUmXg76cJ0v\/M3qihz\r\nQR5oju\/iMiUYKtqec9LU6wfvmGOOvtl2OFOD3ff69FPS2Km8He4pFWkSqw4DGivE\r\nIJLlgqLGIkWm+uNyocANtYqib52AYwJ\/nFMF6nzOvM1LoxHyJlFmudZRju2jAgMB\r\nAAEwDQYJKoZIhvcNAQELBQADggEBAD8mQtw0p3oh9fyOuyTmalHxoG9rLiV0Q2mz\r\n1T0jonVYN7YqSxS\/yWIQnZQ98x2nU93Be4G9VaLT0NZvRjnem2zemSVvuwp11GeK\r\ne80gJTaJjh8n1Z+gD6GU4C+LjWeiR75sd6Jcqfp3bqL6FGvSzIk3QQOfWuC03aXa\r\nFRleNH6rkMV30sWnXyocatculf7ThHZQMN1c0KuQFrd\/alQh\/+EyjBleLozkeC6G\r\n9IlE9DGRK0NUSvy7W68I7cVhR2ToE8oApdOJ1Cd6TpTYMRtvI2lQ4F7vF++ym0Lw\r\nMIxSI44hNeixh8Yn9rcy\/LqOUgl0niB5hfAiauRwHcOY5wf1hKE=\r\n-----END CERTIFICATE-----" +APP_ID="integration_openproject" + registerApps() { app_name=$1 register_app=$(curl -s -o /dev/null -w "%{http_code}" -X POST -uadmin:admin \ - http://localhost:8000/api/v1/apps \ + ${APPSTORE_BASE_URL}/api/v1/apps \ -H "Content-Type: application/json" \ -d "{ \"certificate\": \"${CERTIFICATE}\", @@ -55,7 +54,7 @@ publishApps() { app_version=$2 register_app=$(curl -s -o /dev/null -w "%{http_code}" -X POST -uadmin:admin \ - http://localhost:8000/api/v1/apps/releases \ + ${APPSTORE_BASE_URL}/api/v1/apps/releases \ -H "Content-Type: application/json" \ -d "{ \"download\":\"https://github.com/nextcloud/$APP_ID/releases/download/v$APP_VERSION/$APP_ID-$APP_VERSION.tar.gz\", @@ -71,8 +70,5 @@ publishApps() { fi } -# public certificate of the integration app for testing -CERTIFICATE="-----BEGIN CERTIFICATE-----\r\nMIIEEjCCAvoCAhF6MA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD\r\nVQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoM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4G9VaLT0NZvRjnem2zemSVvuwp11GeK\r\ne80gJTaJjh8n1Z+gD6GU4C+LjWeiR75sd6Jcqfp3bqL6FGvSzIk3QQOfWuC03aXa\r\nFRleNH6rkMV30sWnXyocatculf7ThHZQMN1c0KuQFrd\/alQh\/+EyjBleLozkeC6G\r\n9IlE9DGRK0NUSvy7W68I7cVhR2ToE8oApdOJ1Cd6TpTYMRtvI2lQ4F7vF++ym0Lw\r\nMIxSI44hNeixh8Yn9rcy\/LqOUgl0niB5hfAiauRwHcOY5wf1hKE=\r\n-----END CERTIFICATE-----" -APP_ID="integration_openproject" registerApps "$APP_ID" publishApps "$APP_ID" "$APP_VERSION" \ No newline at end of file diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index b61155199..0b41fbcbe 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -1,11 +1,5 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. -# -# SPDX-License-Identifier: CC0-1.0 +# SPDX-FileCopyrightText: 2026 Jankari Tech Pvt. Ltd. +# SPDX-License-Identifier: AGPL-3.0-or-later name: Upgrade Testing @@ -41,6 +35,7 @@ jobs: DJANGO_SETTINGS_MODULE: nextcloudappstore.settings.development PREVIOUS_APP_VERSION: 2.9.2 UPGRADE_APP_VERSION: 2.10.0 + APPSTORE_BASE_URL: http://localhost:8000 services: database-mysql: image: ghcr.io/nextcloud/continuous-integration-mariadb-10.5:latest @@ -81,8 +76,6 @@ jobs: php-version: ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }} extensions: mbstring, intl, mysql, gd ini-values: post_max_size=256M, max_execution_time=180 - coverage: xdebug - tools: php-cs-fixer, phpunit - name: Build nextcloud project run: | @@ -153,7 +146,7 @@ jobs: - name: Check for Appstore run: | cd appstore - status=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:8000) + status=$(curl -o /dev/null -s -w "%{http_code}" "$APPSTORE_BASE_URL") if [ "$status" -eq 200 ]; then echo "OK" else @@ -164,8 +157,8 @@ jobs: env: APP_VERSION: ${{ env.PREVIOUS_APP_VERSION }} run: | - wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh - bash ./self-hosted-app-store.sh + wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/register-and-publish-app-to-self-hosted-appstore.sh + bash ./register-and-publish-app-to-self-hosted-appstore.sh - name: Enable other apps from official app store run: | @@ -185,7 +178,7 @@ jobs: echo "" > ~/html/nextcloud/data/appdata_*/appstore/apps.json cd ~/html/nextcloud php occ config:system:set ratelimit.protection.enabled --value false --type bool - php occ config:system:set appstoreurl --value http://localhost:8000/api/v1 + php occ config:system:set appstoreurl --value "$APPSTORE_BASE_URL/api/v1" php occ config:system:set allow_local_remote_servers --value true php occ app:install integration_openproject @@ -193,7 +186,7 @@ jobs: env: APP_VERSION: ${{ env.UPGRADE_APP_VERSION }} run: | - bash ./self-hosted-app-store.sh + bash ./register-and-publish-app-to-self-hosted-appstore.sh - name: upgrade apps run: |