Skip to content
Snippets Groups Projects
Commit 3f0294c3 authored by Georg Krause's avatar Georg Krause
Browse files

ci: Run tests for latest develop

parent 4348c636
Branches master
No related tags found
1 merge request!42ci: Run tests for latest develop
Pipeline #36326 failed with stages
in 11 minutes and 10 seconds
...@@ -26,15 +26,10 @@ test-install-script: ...@@ -26,15 +26,10 @@ test-install-script:
image: $TEST_IMAGE image: $TEST_IMAGE
parallel: parallel:
matrix: matrix:
- TEST_IMAGE: - TEST_IMAGE: ["ubuntu:focal", "ubuntu:jammy", "debian:11", "debian:12"]
[
"debian:10",
"ubuntu:focal",
"ubuntu:jammy",
"debian:11",
"debian:12",
]
interruptible: true interruptible: true
variables:
FUNKWHALE_CLI_USER_PASSWORD: supersecurepassword
before_script: before_script:
- apt-get update && apt-get install -y curl - apt-get update && apt-get install -y curl
- | - |
...@@ -50,9 +45,17 @@ test-install-script: ...@@ -50,9 +45,17 @@ test-install-script:
- | - |
set -x set -x
export ANSIBLE_FUNKWHALE_ROLE_PATH=$(pwd) 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: tags:
- docker - docker
test-install-script-develop:
extends: test-install-script
variables:
FUNKWHALE_VERSION: develop
before_script:
- apt-get update && apt-get install -y curl
pages: pages:
stage: deploy stage: deploy
image: buildpack-deps image: buildpack-deps
......
...@@ -95,7 +95,7 @@ _On some hosts, you may need to install the `python-apt` package for check mode ...@@ -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, 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. 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 ## Role Variables
......
...@@ -334,19 +334,20 @@ configure_server() { ...@@ -334,19 +334,20 @@ configure_server() {
cat <<EOF >$base_path/manage cat <<EOF >$base_path/manage
#!/bin/sh #!/bin/sh
set -eu 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 EOF
chmod +x $base_path/manage chmod +x $base_path/manage
if [ -z "$funkwhale_admin_username" ]; then if [ -z "$funkwhale_admin_username" ]; then
echo "[4/$total_steps] Skipping superuser account creation" echo "[4/$total_steps] Skipping superuser account creation"
else else
echo "[4/$total_steps] Creating superuser account…" echo "[4/$total_steps] Creating superuser account…"
echo " Please input the password for the admin account password" if [ -z "$FUNKWHALE_CLI_USER_PASSWORD" ]; then
LOGLEVEL=error sudo -u funkwhale -E $base_path/virtualenv/bin/python \ echo " Please input the password for the admin account password"
$base_path/api/manage.py createsuperuser \ fi
LOGLEVEL=error sudo -u funkwhale -E \
$base_path/virtualenv/bin/funkwhale-manage fw users create --superuser \
--email $funkwhale_admin_email \ --email $funkwhale_admin_email \
--username $funkwhale_admin_username \ --username $funkwhale_admin_username
-v 0
fi fi
} }
......
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
block: "{{ funkwhale_custom_settings }}" block: "{{ funkwhale_custom_settings }}"
- name: "Collect static files" - 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: true
become_user: "{{ funkwhale_username }}" become_user: "{{ funkwhale_username }}"
args: args:
...@@ -288,6 +288,6 @@ ...@@ -288,6 +288,6 @@
- name: "Apply database migrations" - name: "Apply database migrations"
become: true become: true
become_user: "{{ funkwhale_username }}" 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: args:
chdir: "{{ funkwhale_install_path }}" chdir: "{{ funkwhale_install_path }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment