wip
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Ada 2024-04-17 10:45:26 +02:00
parent 440ab26df6
commit f4109954e1
Signed by: ada
GPG key ID: 6A7F898157C6DE6E
3 changed files with 52 additions and 18 deletions

View file

@ -7,26 +7,37 @@
force: true force: true
- name: Build front - name: Build front
ansible.builtin.shell: | ansible.builtin.shell:
executable: /bin/bash
cmd: |
export NODE_ENV=production
cd /opt/authentik/src/website cd /opt/authentik/src/website
npm i npm ci --include=dev
npm run build-docs-only npm run build-docs-only
cd /opt/authentik/src/web cd /opt/authentik/src/web
npm i npm ci --include=dev
npm run build 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
- name: Create virtualenv - name: Create virtualenv
ansible.builtin.command: python3.12 -m venv /opt/authentik/src/venv ansible.builtin.command: python3.12 -m venv /opt/authentik/src/venv
- name: Installl poetry and dependencies - name: Installl poetry and dependencies
ansible.builtin.shell: | ansible.builtin.shell:
cd /opt/authentik/src/ executable: /bin/bash
venv/bin/pip install poetry 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 venv/bin/poetry install --only=main --no-ansi --no-interaction --no-root
- name: Build go proxy
ansible.builtin.shell: |-
cd /opt/authentik/src/
sed -i "s/c.Setup(\".\/authentik\/lib\/default.yml\", \".\/local.env.yml\")/c.Setup(\"\/etc\/authentik\/config.yml\", \".\/authentik\/lib\/default.yml\", \".\/local.env.yml\")/" /opt/authentik/src/internal/config/config.go
go build -o /opt/authentik/src/authentik-server ./cmd/server/

View file

@ -1,9 +1,13 @@
--- ---
- name: Install roles dependencies - name: Install roles dependencies
ansible.builtin.apt: ansible.builtin.apt:
install_recommends: false
name: "{{ item }}" name: "{{ item }}"
with_items: with_items:
- git - git
- build-essential
- pkg-config
- zlib1g-dev
- libpq-dev - libpq-dev
- libxmlsec1-dev - libxmlsec1-dev

View file

@ -11,3 +11,22 @@
tags: tags:
- build - build
become_user: authentik become_user: authentik
- name: Create useful directory
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: "0755"
owner: authentik
with_items:
- /opt/authentik/certs
- /opt/authentik/media
- /etc/authentik
- name: Test
ansible.builtin.copy:
remote_src: true
src: /opt/authentik/src/blueprints
dest: /opt/authentik/blueprints
owner: authentik
become: true