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

Review app for docs

parent 7d60155b
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ stages: ...@@ -13,7 +13,7 @@ stages:
- build - build
- deploy - deploy
review: review_front:
stage: review stage: review
image: node:9 image: node:9
when: manual when: manual
...@@ -25,31 +25,71 @@ review: ...@@ -25,31 +25,71 @@ review:
# this is to ensure we don't have any errors in the output, # this is to ensure we don't have any errors in the output,
# cf https://code.eliotberriot.com/funkwhale/funkwhale/issues/169 # cf https://code.eliotberriot.com/funkwhale/funkwhale/issues/169
- INSTANCE_URL=$REVIEW_INSTANCE_URL yarn run build | tee /dev/stderr | (! grep -i 'ERROR in') - INSTANCE_URL=$REVIEW_INSTANCE_URL yarn run build | tee /dev/stderr | (! grep -i 'ERROR in')
- mkdir -p /static/$CI_BUILD_REF_SLUG - mkdir -p /static/front/$CI_BUILD_REF_SLUG
- cp -r dist/* /static/$CI_BUILD_REF_SLUG - cp -r dist/* /static/front/$CI_BUILD_REF_SLUG
cache: cache:
key: "$CI_PROJECT_ID__front_dependencies" key: "$CI_PROJECT_ID__front_dependencies"
paths: paths:
- front/node_modules - front/node_modules
- front/yarn.lock - front/yarn.lock
environment: environment:
name: review/$CI_BUILD_REF_NAME name: review/front-$CI_BUILD_REF_NAME
url: http://$CI_BUILD_REF_SLUG.$REVIEW_DOMAIN url: http://front-$CI_BUILD_REF_SLUG.$REVIEW_DOMAIN
on_stop: stop_review on_stop: stop_front_review
only: only:
- branches@funkwhale/funkwhale - branches@funkwhale/funkwhale
tags: tags:
- funkwhale-review - funkwhale-review
stop_review: stop_front_review:
stage: review stage: review
script: script:
- rm -rf /static/$CI_BUILD_REF_SLUG/ - rm -rf /static/front/$CI_BUILD_REF_SLUG/
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
when: manual when: manual
environment: environment:
name: review/$CI_BUILD_REF_NAME name: review/front-$CI_BUILD_REF_NAME
action: stop
tags:
- funkwhale-review
review_docs:
stage: review
image: python:3.6
when: manual
allow_failure: true
variables:
BUILD_PATH: "../public"
before_script:
- cd docs
cache:
key: "$CI_PROJECT_ID__sphinx"
paths:
- "$PIP_CACHE_DIR"
script:
- pip install sphinx
- ./build_docs.sh
- mkdir -p /static/docs/$CI_BUILD_REF_SLUG
- cp -r $CI_PROJECT_DIR/public/* /static/docs/$CI_BUILD_REF_SLUG
environment:
name: review/docs-$CI_BUILD_REF_NAME
url: http://docs-$CI_BUILD_REF_SLUG.$REVIEW_DOMAIN
on_stop: stop_docs_review
only:
- branches@funkwhale/funkwhale
tags:
- funkwhale-review
stop_docs_review:
stage: review
script:
- rm -rf /static/docs/$CI_BUILD_REF_SLUG/
variables:
GIT_STRATEGY: none
when: manual
environment:
name: review/docs-$CI_BUILD_REF_NAME
action: stop action: stop
tags: tags:
- funkwhale-review - funkwhale-review
...@@ -168,6 +208,10 @@ pages: ...@@ -168,6 +208,10 @@ pages:
script: script:
- pip install sphinx - pip install sphinx
- ./build_docs.sh - ./build_docs.sh
cache:
key: "$CI_PROJECT_ID__sphinx"
paths:
- "$PIP_CACHE_DIR"
artifacts: artifacts:
paths: paths:
- public - public
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment