Skip to content
Snippets Groups Projects
Verified Commit 690bc47f authored by Eliot Berriot's avatar Eliot Berriot
Browse files

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

parent 2e3a2cd6
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
let url = process.env.INSTANCE_URL || '/'
module.exports = {
NODE_ENV: '"production"'
NODE_ENV: '"production"',
INSTANCE_URL: `"${url}"`
}
......@@ -6,7 +6,7 @@ export default {
namespaced: true,
state: {
maxEvents: 200,
instanceUrl: '/',
instanceUrl: process.env.INSTANCE_URL,
events: [],
settings: {
instance: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment