feat: add variables to configure the virtualenv
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Robert Kaussow 2022-02-09 19:29:50 +01:00
parent c26173144c
commit 165c599fa1
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,9 @@
--- ---
matrix_version: "1.26.0" matrix_version: "1.26.0"
matrix_virtualenv_command: /usr/bin/python3 -m venv
matrix_virtualenv: "{{ matrix_base_dir }}/env"
matrix_user: matrix matrix_user: matrix
matrix_user_home: "/home/{{ matrix_user }}" matrix_user_home: "/home/{{ matrix_user }}"
matrix_group: "{{ matrix_user }}" matrix_group: "{{ matrix_user }}"
@ -18,7 +21,6 @@ matrix_packages:
- tcl-devel - tcl-devel
- tk-devel - tk-devel
- redhat-rpm-config - redhat-rpm-config
- python36-devel
- libffi-devel - libffi-devel
- openssl-devel - openssl-devel

View File

@ -18,8 +18,8 @@
- name: Upgrade python dependencies - name: Upgrade python dependencies
pip: pip:
name: "{{ item }}" name: "{{ item }}"
virtualenv: "{{ matrix_base_dir }}/env" virtualenv: "{{ matrix_virtualenv }}"
virtualenv_command: /usr/bin/python3 -m venv virtualenv_command: "{{ /usr/bin/python3 -m venv }}"
extra_args: --upgrade extra_args: --upgrade
loop: loop:
- pip - pip
@ -29,15 +29,15 @@
pip: pip:
name: matrix-synapse[all] name: matrix-synapse[all]
version: "{{ matrix_version }}" version: "{{ matrix_version }}"
virtualenv: "{{ matrix_base_dir }}/env" virtualenv: "{{ matrix_virtualenv }}"
virtualenv_command: /usr/bin/python3 -m venv virtualenv_command: "{{ /usr/bin/python3 -m venv }}"
notify: __matrix_restart notify: __matrix_restart
- name: Install ldap3 auth provider - name: Install ldap3 auth provider
pip: pip:
name: "matrix-synapse-ldap3" name: "matrix-synapse-ldap3"
virtualenv: "{{ matrix_base_dir }}/env" virtualenv: "{{ matrix_virtualenv }}"
virtualenv_command: /usr/bin/python3 -m venv virtualenv_command: "{{ /usr/bin/python3 -m venv }}"
when: matrix_ldap_auth_enabled | bool when: matrix_ldap_auth_enabled | bool
- name: Deploy existing signing key - name: Deploy existing signing key
@ -48,7 +48,7 @@
when: matrix_signing_key is defined when: matrix_signing_key is defined
- name: Create new signing key if not provided - name: Create new signing key if not provided
shell: '{{ matrix_base_dir }}/env/bin/python -c "from signedjson import key; file = open(''{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key'',''w''); key.write_signing_keys(file, [key.generate_signing_key(''first'')]); file.close()"' shell: '{{ matrix_virtualenv }}/bin/python -c "from signedjson import key; file = open(''{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key'',''w''); key.write_signing_keys(file, [key.generate_signing_key(''first'')]); file.close()"'
args: args:
creates: "{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key" creates: "{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key"
notify: __matrix_restart notify: __matrix_restart