See #327: review app for the front \o/
This commit is contained in:
parent
2e3a2cd6dd
commit
690bc47fd3
|
@ -7,11 +7,53 @@ variables:
|
||||||
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- review
|
||||||
- lint
|
- lint
|
||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- deploy
|
- 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:
|
black:
|
||||||
image: python:3.6
|
image: python:3.6
|
||||||
stage: lint
|
stage: lint
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
let url = process.env.INSTANCE_URL || '/'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: '"production"'
|
NODE_ENV: '"production"',
|
||||||
|
INSTANCE_URL: `"${url}"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
state: {
|
state: {
|
||||||
maxEvents: 200,
|
maxEvents: 200,
|
||||||
instanceUrl: '/',
|
instanceUrl: process.env.INSTANCE_URL,
|
||||||
events: [],
|
events: [],
|
||||||
settings: {
|
settings: {
|
||||||
instance: {
|
instance: {
|
||||||
|
|
Loading…
Reference in New Issue