hac/ansible/roles/authentik/tasks/build.yml

44 lines
1.2 KiB
YAML
Raw Normal View History

2024-03-25 00:32:09 +01:00
---
- name: Get authentik source
ansible.builtin.git:
2024-03-25 00:51:16 +01:00
repo: https://github.com/goauthentik/authentik.git
2024-03-25 00:32:09 +01:00
dest: /opt/authentik/src
version: version/2024.2.2
force: true
- name: Build front
2024-04-17 10:45:26 +02:00
ansible.builtin.shell:
executable: /bin/bash
cmd: |
export NODE_ENV=production
cd /opt/authentik/src/website
npm ci --include=dev
npm run build-docs-only
cd /opt/authentik/src/web
npm ci --include=dev
npm run build
- name: Build go proxy
ansible.builtin.shell:
executable: /bin/bash
cmd: |
cd /opt/authentik/src/
go mod download
CGO_ENABLED=0 go build -o /opt/authentik/server ./cmd/server
2024-03-25 00:32:09 +01:00
- name: Create virtualenv
2024-03-25 00:51:16 +01:00
ansible.builtin.command: python3.12 -m venv /opt/authentik/src/venv
2024-03-25 00:32:09 +01:00
- name: Installl poetry and dependencies
2024-04-17 10:45:26 +02:00
ansible.builtin.shell:
executable: /bin/bash
cmd: |
cd /opt/authentik/src
source /opt/authentik/src/venv/bin/activate
export VENV_PATH=/opt/authentik/src/venv
export POETRY_VIRTUALENVS_CREATE=false
venv/bin/pip3 install --upgrade pip
venv/bin/pip3 install poetry
venv/bin/poetry venv use venv/python3.12
venv/bin/poetry install --only=main --no-ansi --no-interaction --no-root