diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 977f999929a58059ff3547d06d9851cf87c2f02a..b1f6dd7610b112f941c37c109f33ddcaab2a2180 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,15 +26,10 @@ test-install-script: image: $TEST_IMAGE parallel: matrix: - - TEST_IMAGE: - [ - "debian:10", - "ubuntu:focal", - "ubuntu:jammy", - "debian:11", - "debian:12", - ] + - TEST_IMAGE: ["ubuntu:focal", "ubuntu:jammy", "debian:11", "debian:12"] interruptible: true + variables: + FUNKWHALE_CLI_USER_PASSWORD: supersecurepassword before_script: - apt-get update && apt-get install -y curl - | @@ -50,9 +45,17 @@ test-install-script: - | set -x export ANSIBLE_FUNKWHALE_ROLE_PATH=$(pwd) - printf 'test.deployment\ntest\ncontact@test.deployment\nY\nN\n\n\n\N\n\n\n' | bash install.sh + printf 'test.deployment\ntest1234\ncontact@test.deployment\nY\nN\n\n\n\N\n\n\n' | bash install.sh tags: - docker + +test-install-script-develop: + extends: test-install-script + variables: + FUNKWHALE_VERSION: develop + before_script: + - apt-get update && apt-get install -y curl + pages: stage: deploy image: buildpack-deps diff --git a/README.md b/README.md index 7d48a9c2dca5a7392989bdde2be0f31c40c19b01..07a80689995a2857068c71ed6411111f231664e1 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ _On some hosts, you may need to install the `python-apt` package for check mode This command will show you the changes that would be applied to your system. If you are comfortable with them, rerun the same command without the `--check` flag. -Once installation is complete, run `/srv/funkwhale/virtualenv/bin/python /srv/funkwhale/api/manage.py createsuperuser` to create your admin account. +Once installation is complete, run `/srv/funkwhale/virtualenv/bin/funkwhale-manage createsuperuser` to create your admin account. ## Role Variables diff --git a/install.sh b/install.sh index 42b3ac8107342dff6cf140818c961dc3cf79e2a3..3cd1fd2d6f20c91c3097cd03db24a1c6323cce65 100755 --- a/install.sh +++ b/install.sh @@ -334,19 +334,20 @@ configure_server() { cat <<EOF >$base_path/manage #!/bin/sh set -eu -sudo -u funkwhale -E $base_path/virtualenv/bin/python $base_path/api/manage.py \$@ +sudo -u funkwhale -E $base_path/virtualenv/bin/funkwhale-manage \$@ EOF chmod +x $base_path/manage if [ -z "$funkwhale_admin_username" ]; then echo "[4/$total_steps] Skipping superuser account creation" else echo "[4/$total_steps] Creating superuser account…" - echo " Please input the password for the admin account password" - LOGLEVEL=error sudo -u funkwhale -E $base_path/virtualenv/bin/python \ - $base_path/api/manage.py createsuperuser \ + if [ -z "$FUNKWHALE_CLI_USER_PASSWORD" ]; then + echo " Please input the password for the admin account password" + fi + LOGLEVEL=error sudo -u funkwhale -E \ + $base_path/virtualenv/bin/funkwhale-manage fw users create --superuser \ --email $funkwhale_admin_email \ - --username $funkwhale_admin_username \ - -v 0 + --username $funkwhale_admin_username fi } diff --git a/tasks/funkwhale.yml b/tasks/funkwhale.yml index e1210a1e84f0504d8499ea69c0e791b1ab9a035f..54165503b17627c30e1ea4a1d5ff329b70a4d79d 100644 --- a/tasks/funkwhale.yml +++ b/tasks/funkwhale.yml @@ -279,7 +279,7 @@ block: "{{ funkwhale_custom_settings }}" - name: "Collect static files" - command: "{{ funkwhale_install_path }}/virtualenv/bin/python api/manage.py collectstatic --no-input" + command: "{{ funkwhale_install_path }}/virtualenv/bin/funkwhale-manage collectstatic --no-input" become: true become_user: "{{ funkwhale_username }}" args: @@ -288,6 +288,6 @@ - name: "Apply database migrations" become: true become_user: "{{ funkwhale_username }}" - command: "{{ funkwhale_install_path }}/virtualenv/bin/python api/manage.py migrate --no-input" + command: "{{ funkwhale_install_path }}/virtualenv/bin/funkwhale-manage migrate --no-input" args: chdir: "{{ funkwhale_install_path }}"