See #327: review app for the front \o/

environments/review-310-player-qe6gz1/deployments/8
Eliot Berriot 2018-06-23 16:51:31 +02:00
rodzic 2e3a2cd6dd
commit 690bc47fd3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
3 zmienionych plików z 46 dodań i 2 usunięć

Wyświetl plik

@ -7,11 +7,53 @@ variables:
stages:
- review
- lint
- test
- build
- deploy
review:
stage: review
image: node:9
when: manual
allow_failure: true
before_script:
- cd front
script:
- yarn install
# this is to ensure we don't have any errors in the output,
# cf https://code.eliotberriot.com/funkwhale/funkwhale/issues/169
- INSTANCE_URL=$REVIEW_INSTANCE_URL yarn run build | tee /dev/stderr | (! grep -i 'ERROR in')
- mkdir -p /static/$CI_BUILD_REF_SLUG
- cp -r dist/* /static/$CI_BUILD_REF_SLUG
cache:
key: "$CI_PROJECT_ID__front_dependencies"
paths:
- front/node_modules
- front/yarn.lock
environment:
name: review/$CI_BUILD_REF_NAME
url: http://$CI_BUILD_REF_SLUG.$REVIEW_DOMAIN
on_stop: stop_review
only:
- branches@funkwhale/funkwhale
tags:
- funkwhale-review
stop_review:
stage: review
script:
- rm -rf /static/$CI_BUILD_REF_SLUG/
variables:
GIT_STRATEGY: none
when: manual
environment:
name: review/$CI_BUILD_REF_NAME
action: stop
tags:
- funkwhale-review
black:
image: python:3.6
stage: lint

Wyświetl plik

@ -1,3 +1,5 @@
let url = process.env.INSTANCE_URL || '/'
module.exports = {
NODE_ENV: '"production"'
NODE_ENV: '"production"',
INSTANCE_URL: `"${url}"`
}

Wyświetl plik

@ -6,7 +6,7 @@ export default {
namespaced: true,
state: {
maxEvents: 200,
instanceUrl: '/',
instanceUrl: process.env.INSTANCE_URL,
events: [],
settings: {
instance: {