20 lines
724 B
YAML
20 lines
724 B
YAML
- hosts: all
|
|
pre_tasks:
|
|
- name: Update homepage for sub directory deployment
|
|
replace:
|
|
path: '{{ zuul.project.src_dir }}/web/package.json'
|
|
regexp: '"homepage": "/"'
|
|
replace: '"homepage": "./"'
|
|
# NOTE: using "./" is not enough to support html5 links, even with
|
|
# rewrite rules for unknown files, accessing 'job/devstack' will make
|
|
# the dashboard load static files from 'job/static/...'
|
|
# This works for the preview dashboard that can only be loaded from the
|
|
# npm/html directory anyway.
|
|
roles:
|
|
- revoke-sudo
|
|
- set-zuul-log-path-fact
|
|
- role: npm
|
|
npm_command: build
|
|
environment:
|
|
REACT_APP_ZUUL_API: "{{ zuul_api_url }}/api/"
|