From db15f5bb6e4e2c4c79106977e8a493efeb91871e Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:49:47 +0300 Subject: [PATCH] renamed "cloud-py-api" to "nextcloud" for "app-skeleton-python" and "test-deploy" (#420) Also appid for "skeleton" is now "app-skeleton-python" edited: juliushaertl -> juliusknorr Signed-off-by: Alexander Piskun --- .github/workflows/tests-deploy.yml | 118 ++++++++++++++--------------- lib/AppInfo/Application.php | 2 +- tests/test_occ_commands_docker.py | 26 +++---- 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/.github/workflows/tests-deploy.yml b/.github/workflows/tests-deploy.yml index 17f3a91d..d4fb738b 100644 --- a/.github/workflows/tests-deploy.yml +++ b/.github/workflows/tests-deploy.yml @@ -90,25 +90,25 @@ jobs: run: | PHP_CLI_SERVER_WORKERS=2 php -S 127.0.0.1:8080 & ./occ app_api:daemon:register docker_local_sock Docker docker-install http /var/run/docker.sock http://127.0.0.1:8080/index.php - ./occ app_api:app:register skeleton docker_local_sock \ - --info-xml https://raw.githubusercontent.com/cloud-py-api/app-skeleton-python/main/appinfo/info.xml - ./occ app_api:app:enable skeleton - ./occ app_api:app:disable skeleton + ./occ app_api:app:register app-skeleton-python docker_local_sock \ + --info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml + ./occ app_api:app:enable app-skeleton-python + ./occ app_api:app:disable app-skeleton-python - name: Check logs run: | - grep -q 'Hello from skeleton :)' data/nextcloud.log || error - grep -q 'Bye bye from skeleton :(' data/nextcloud.log || error + 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 container info & logs if: always() run: | - docker inspect nc_app_skeleton | json_pp > container.json - docker logs nc_app_skeleton > container.log 2>&1 + docker inspect nc_app_app-skeleton-python | json_pp > container.json + docker logs nc_app_app-skeleton-python > container.log 2>&1 - name: Unregister Skeleton & Daemon run: | - ./occ app_api:app:unregister skeleton + ./occ app_api:app:unregister app-skeleton-python ./occ app_api:daemon:unregister docker_local_sock - name: Test OCC commands(docker) @@ -142,7 +142,7 @@ jobs: runs-on: ubuntu-22.04 name: NC In Julius Docker • 🐘8.3 env: - docker-image: ghcr.io/juliushaertl/nextcloud-dev-php83:master + docker-image: ghcr.io/juliusknorr/nextcloud-dev-php83:master steps: - name: Set app env @@ -165,10 +165,10 @@ jobs: docker_local_sock Docker docker-install http /var/run/docker.sock http://nextcloud/index.php \ --net=master_bridge docker exec nextcloud sudo -u www-data php occ app_api:daemon:list - docker exec nextcloud sudo -u www-data php occ app_api:app:register skeleton docker_local_sock \ - --info-xml https://raw.githubusercontent.com/cloud-py-api/app-skeleton-python/main/appinfo/info.xml - docker exec nextcloud sudo -u www-data php occ app_api:app:enable skeleton - docker exec nextcloud sudo -u www-data php occ app_api:app:disable skeleton + docker exec nextcloud sudo -u www-data php occ app_api:app:register app-skeleton-python docker_local_sock \ + --info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml + docker exec nextcloud sudo -u www-data php occ app_api:app:enable app-skeleton-python + docker exec nextcloud sudo -u www-data php occ app_api:app:disable app-skeleton-python - name: Copy NC log to host if: always() @@ -176,18 +176,18 @@ jobs: - name: Check logs run: | - grep -q 'Hello from skeleton :)' nextcloud.log || error - grep -q 'Bye bye from skeleton :(' nextcloud.log || error + grep -q 'Hello from app-skeleton-python :)' nextcloud.log || error + grep -q 'Bye bye from app-skeleton-python :(' nextcloud.log || error - name: Save container info & logs if: always() run: | - docker inspect nc_app_skeleton | json_pp > container.json - docker logs nc_app_skeleton > container.log 2>&1 + docker inspect app-skeleton-python | json_pp > container.json + docker logs nc_app_app-skeleton-python > container.log 2>&1 - name: Unregister Skeleton & Daemon run: | - docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton + docker exec nextcloud sudo -u www-data php occ app_api:app:unregister app-skeleton-python docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_local_sock - name: Upload Container info @@ -218,7 +218,7 @@ jobs: runs-on: ubuntu-22.04 name: NC In Julius Docker(DSP-HTTP) • 🐘8.3 env: - docker-image: ghcr.io/juliushaertl/nextcloud-dev-php83:master + docker-image: ghcr.io/juliusknorr/nextcloud-dev-php83:master steps: - name: Set app env @@ -230,7 +230,7 @@ jobs: docker run -v /var/run/docker.sock:/var/run/docker.sock \ -e NC_HAPROXY_PASSWORD="some_secure_password" \ --net master_bridge --name nextcloud-appapi-dsp -h nextcloud-appapi-dsp \ - --privileged -d ghcr.io/cloud-py-api/nextcloud-appapi-dsp:latest + --privileged -d ghcr.io/nextcloud/nextcloud-appapi-dsp:latest docker run --net master_bridge --name nextcloud --rm -d ${{ env.docker-image }} sleep 60s @@ -244,10 +244,10 @@ jobs: docker_by_port Docker docker-install http nextcloud-appapi-dsp:2375 http://nextcloud/index.php \ --net=master_bridge --haproxy_password=some_secure_password docker exec nextcloud sudo -u www-data php occ app_api:daemon:list - docker exec nextcloud sudo -u www-data php occ app_api:app:register skeleton docker_by_port \ - --info-xml https://raw.githubusercontent.com/cloud-py-api/app-skeleton-python/main/appinfo/info.xml - docker exec nextcloud sudo -u www-data php occ app_api:app:enable skeleton - docker exec nextcloud sudo -u www-data php occ app_api:app:disable skeleton + docker exec nextcloud sudo -u www-data php occ app_api:app:register app-skeleton-python docker_by_port \ + --info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml + docker exec nextcloud sudo -u www-data php occ app_api:app:enable app-skeleton-python + docker exec nextcloud sudo -u www-data php occ app_api:app:disable app-skeleton-python - name: Copy NC log to host if: always() @@ -255,18 +255,18 @@ jobs: - name: Check logs run: | - grep -q 'Hello from skeleton :)' nextcloud.log || error - grep -q 'Bye bye from skeleton :(' nextcloud.log || error + grep -q 'Hello from app-skeleton-python :)' nextcloud.log || error + grep -q 'Bye bye from app-skeleton-python :(' nextcloud.log || error - name: Save container info & logs if: always() run: | - docker inspect nc_app_skeleton | json_pp > container.json - docker logs nc_app_skeleton > container.log 2>&1 + docker inspect nc_app_app-skeleton-python | json_pp > container.json + docker logs nc_app_app-skeleton-python > container.log 2>&1 - name: Unregister Skeleton & Daemon run: | - docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton + docker exec nextcloud sudo -u www-data php occ app_api:app:unregister app-skeleton-python docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_by_port - name: Upload Container info @@ -297,7 +297,7 @@ jobs: runs-on: ubuntu-22.04 name: NC In Julius Docker(DSP-HTTPS) • 🐘8.3 env: - docker-image: ghcr.io/juliushaertl/nextcloud-dev-php83:master + docker-image: ghcr.io/juliusknorr/nextcloud-dev-php83:master steps: - name: Set app env @@ -317,7 +317,7 @@ jobs: -e BIND_ADDRESS="172.17.0.1" \ -e EX_APPS_NET="ipv4@localhost" \ --net host --name nextcloud-appapi-dsp -h nextcloud-appapi-dsp \ - --privileged -d ghcr.io/cloud-py-api/nextcloud-appapi-dsp:latest + --privileged -d ghcr.io/nextcloud/nextcloud-appapi-dsp:latest docker run --net=bridge --name=nextcloud -p 8080:80 --rm -d ${{ env.docker-image }} sleep 60s hostname -I @@ -335,10 +335,10 @@ jobs: docker_by_port Docker docker-install https host.docker.internal:2375 http://localhost:8080/index.php \ --net=host --haproxy_password=some_secure_password docker exec nextcloud sudo -u www-data php occ app_api:daemon:list - docker exec nextcloud sudo -u www-data php occ app_api:app:register skeleton docker_by_port \ - --info-xml https://raw.githubusercontent.com/cloud-py-api/app-skeleton-python/main/appinfo/info.xml - docker exec nextcloud sudo -u www-data php occ app_api:app:enable skeleton - docker exec nextcloud sudo -u www-data php occ app_api:app:disable skeleton + docker exec nextcloud sudo -u www-data php occ app_api:app:register app-skeleton-python docker_by_port \ + --info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml + docker exec nextcloud sudo -u www-data php occ app_api:app:enable app-skeleton-python + docker exec nextcloud sudo -u www-data php occ app_api:app:disable app-skeleton-python - name: Copy NC log to host if: always() @@ -346,8 +346,8 @@ jobs: - name: Check logs run: | - grep -q 'Hello from skeleton :)' nextcloud.log || error - grep -q 'Bye bye from skeleton :(' nextcloud.log || error + grep -q 'Hello from app-skeleton-python :)' nextcloud.log || error + grep -q 'Bye bye from app-skeleton-python :(' nextcloud.log || error - name: Save HaProxy logs if: always() @@ -356,12 +356,12 @@ jobs: - name: Save container info & logs if: always() run: | - docker inspect nc_app_skeleton | json_pp > container.json - docker logs nc_app_skeleton > container.log 2>&1 + docker inspect nc_app_app-skeleton-python | json_pp > container.json + docker logs nc_app_app-skeleton-python > container.log 2>&1 - name: Unregister Skeleton & Daemon run: | - docker exec nextcloud sudo -u www-data php occ app_api:app:unregister skeleton + docker exec nextcloud sudo -u www-data php occ app_api:app:unregister app-skeleton-python docker exec nextcloud sudo -u www-data php occ app_api:daemon:unregister docker_by_port - name: Upload HaProxy logs @@ -484,25 +484,25 @@ jobs: PHP_CLI_SERVER_WORKERS=2 php -S 127.0.0.1:8080 & ./occ app_api:daemon:register docker_local_sock Docker docker-install http /var/run/docker.sock http://127.0.0.1:8080/index.php ./occ app_api:daemon:list - ./occ app_api:app:register skeleton docker_local_sock \ - --info-xml https://raw.githubusercontent.com/cloud-py-api/app-skeleton-python/main/appinfo/info.xml - ./occ app_api:app:enable skeleton - ./occ app_api:app:disable skeleton + ./occ app_api:app:register app-skeleton-python docker_local_sock \ + --info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml + ./occ app_api:app:enable app-skeleton-python + ./occ app_api:app:disable app-skeleton-python - name: Check logs run: | - grep -q 'Hello from skeleton :)' data/nextcloud.log || error - grep -q 'Bye bye from skeleton :(' data/nextcloud.log || error + 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 container info & logs if: always() run: | - docker inspect nc_app_skeleton | json_pp > container.json - docker logs nc_app_skeleton > container.log 2>&1 + docker inspect nc_app_app-skeleton-python | json_pp > container.json + docker logs nc_app_app-skeleton-python > container.log 2>&1 - name: Unregister Skeleton & Daemon run: | - ./occ app_api:app:unregister skeleton + ./occ app_api:app:unregister app-skeleton-python ./occ app_api:daemon:unregister docker_local_sock - name: Test OCC commands(docker) @@ -608,25 +608,25 @@ jobs: docker_socket_local Docker docker-install http /var/run/docker.sock http://127.0.0.1:8080/index.php \ --net=host --set-default ./occ app_api:daemon:list - ./occ app_api:app:register skeleton \ - --info-xml https://raw.githubusercontent.com/cloud-py-api/app-skeleton-python/main/appinfo/info.xml - ./occ app_api:app:enable skeleton - ./occ app_api:app:disable skeleton + ./occ app_api:app:register app-skeleton-python \ + --info-xml https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml + ./occ app_api:app:enable app-skeleton-python + ./occ app_api:app:disable app-skeleton-python - name: Check logs run: | - grep -q 'Hello from skeleton :)' data/nextcloud.log || error - grep -q 'Bye bye from skeleton :(' data/nextcloud.log || error + 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 container info & logs if: always() run: | - docker inspect nc_app_skeleton | json_pp > container.json - docker logs nc_app_skeleton > container.log 2>&1 + docker inspect nc_app_app-skeleton-python | json_pp > container.json + docker logs nc_app_app-skeleton-python > container.log 2>&1 - name: Unregister Skeleton & Daemon run: | - ./occ app_api:app:unregister skeleton + ./occ app_api:app:unregister app-skeleton-python ./occ app_api:daemon:unregister docker_socket_local - name: Test OCC commands(docker) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 2d0cac7d..a0ab334e 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -53,7 +53,7 @@ class Application extends App implements IBootstrap { public const APP_ID = 'app_api'; public const TEST_DEPLOY_APPID = 'test-deploy'; - public const TEST_DEPLOY_INFO_XML = 'https://raw.githubusercontent.com/cloud-py-api/test-deploy/main/appinfo/info.xml'; + public const TEST_DEPLOY_INFO_XML = 'https://raw.githubusercontent.com/nextcloud/test-deploy/main/appinfo/info.xml'; public function __construct(array $urlParams = []) { parent::__construct(self::APP_ID, $urlParams); diff --git a/tests/test_occ_commands_docker.py b/tests/test_occ_commands_docker.py index eeb41b8f..b729b498 100644 --- a/tests/test_occ_commands_docker.py +++ b/tests/test_occ_commands_docker.py @@ -2,7 +2,7 @@ SKELETON_XML_URL = ( - "https://raw.githubusercontent.com/cloud-py-api/app-skeleton-python/main/appinfo/info.xml" + "https://raw.githubusercontent.com/nextcloud/app-skeleton-python/main/appinfo/info.xml" ) @@ -27,13 +27,13 @@ def unregister_daemon(): def deploy_register(): run( - f"php occ app_api:app:deploy skeleton docker_local_sock --info-xml {SKELETON_XML_URL}".split(), + f"php occ app_api:app:deploy app-skeleton-python docker_local_sock --info-xml {SKELETON_XML_URL}".split(), stderr=DEVNULL, stdout=DEVNULL, check=True, ) run( - f"php occ app_api:app:register skeleton docker_local_sock --info-xml {SKELETON_XML_URL}".split(), + f"php occ app_api:app:register app-skeleton-python docker_local_sock --info-xml {SKELETON_XML_URL}".split(), stderr=DEVNULL, stdout=DEVNULL, check=True, @@ -57,29 +57,29 @@ def deploy_register(): assert r_output.find("http://127.0.0.1:8080/index.php/") == -1 assert r_output.find("http://127.0.0.1:8080/index.php") != -1 # silent should not fail, as there are not such ExApp - r = run("php occ --no-warnings app_api:app:unregister skeleton --silent".split(), stdout=PIPE, stderr=PIPE, check=True) + r = run("php occ --no-warnings app_api:app:unregister app-skeleton-python --silent".split(), stdout=PIPE, stderr=PIPE, check=True) assert not r.stderr.decode("UTF-8") r_output = r.stdout.decode("UTF-8") assert not r_output, f"Output should be empty: {r_output}" # without "--silent" it should fail, as there are not such ExApp - r = run("php occ --no-warnings app_api:app:unregister skeleton".split(), stdout=PIPE) + r = run("php occ --no-warnings app_api:app:unregister app-skeleton-python".split(), stdout=PIPE) assert r.returncode assert r.stdout.decode("UTF-8"), "Output should be non empty" # testing if volume is kept by default deploy_register() - r = run("php occ --no-warnings app_api:app:unregister skeleton".split(), stdout=PIPE, check=True) + r = run("php occ --no-warnings app_api:app:unregister app-skeleton-python".split(), stdout=PIPE, check=True) assert r.stdout.decode("UTF-8"), "Output should be non empty" - run("docker volume inspect nc_app_skeleton_data".split(), check=True) + run("docker volume inspect nc_app_app-skeleton-python_data".split(), check=True) # test if volume will be removed with "--rm-data" deploy_register() - run("php occ --no-warnings app_api:app:unregister skeleton --rm-data".split(), check=True) - r = run("docker volume inspect nc_app_skeleton_data".split()) + run("php occ --no-warnings app_api:app:unregister app-skeleton-python --rm-data".split(), check=True) + r = run("docker volume inspect nc_app_app-skeleton-python_data".split()) assert r.returncode # test "--force" option deploy_register() - run("docker container rm --force nc_app_skeleton".split(), check=True) - r = run("php occ --no-warnings app_api:app:unregister skeleton".split()) + run("docker container rm --force nc_app_app-skeleton-python".split(), check=True) + r = run("php occ --no-warnings app_api:app:unregister app-skeleton-python".split()) assert r.returncode - r = run("php occ --no-warnings app_api:app:unregister skeleton --silent".split()) + r = run("php occ --no-warnings app_api:app:unregister app-skeleton-python --silent".split()) assert r.returncode - run("php occ --no-warnings app_api:app:unregister skeleton --force".split(), check=True) + run("php occ --no-warnings app_api:app:unregister app-skeleton-python --force".split(), check=True)