2018-09-21 21:00:42 +00:00
|
|
|
image: framasoft/vuefs:latest
|
2018-02-28 15:33:36 +00:00
|
|
|
stages:
|
2019-09-26 20:11:50 +00:00
|
|
|
- test
|
2018-02-28 15:52:25 +00:00
|
|
|
- deploy
|
2018-02-28 15:33:36 +00:00
|
|
|
|
2019-09-26 20:11:50 +00:00
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- npm install -g yaml-lint
|
|
|
|
- for f in $(find ./app/ -name "*.yml" -type f);do yamllint $f;done;
|
|
|
|
|
2018-09-21 21:00:42 +00:00
|
|
|
pages:
|
|
|
|
stage: deploy
|
2018-02-28 15:33:36 +00:00
|
|
|
script:
|
2018-09-21 21:00:42 +00:00
|
|
|
- npm install
|
|
|
|
- npm run preview
|
|
|
|
- mv -f public/$CI_PROJECT_NAME/* public
|
2019-09-26 20:11:50 +00:00
|
|
|
- find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
|
2018-09-21 21:00:42 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- node_modules/
|
2018-02-28 15:33:36 +00:00
|
|
|
|
2018-09-21 21:00:42 +00:00
|
|
|
production:
|
2018-02-28 15:55:41 +00:00
|
|
|
stage: deploy
|
|
|
|
script:
|
2018-09-21 21:00:42 +00:00
|
|
|
- npm install
|
|
|
|
- npm run prod
|
|
|
|
- cp ./public/fr/index.html ./public/index.html
|
2019-02-06 12:08:03 +00:00
|
|
|
- for f in $(find -type l);do cp --remove-destination $(readlink -f $f) $f;done;
|
2018-09-21 21:00:42 +00:00
|
|
|
- mkdir "${HOME}/.ssh"
|
|
|
|
- chmod 700 "${HOME}/.ssh"
|
2019-09-26 15:24:01 +00:00
|
|
|
- echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts;
|
2018-09-21 21:00:42 +00:00
|
|
|
- eval `ssh-agent -s`
|
2019-09-26 15:24:01 +00:00
|
|
|
- ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i);
|
|
|
|
- cd public && echo "put -r ." | sftp ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web;
|
2018-02-28 15:55:41 +00:00
|
|
|
only:
|
2019-09-26 15:24:01 +00:00
|
|
|
refs:
|
2018-02-28 15:55:41 +00:00
|
|
|
- master
|
2019-09-26 15:24:01 +00:00
|
|
|
variables:
|
|
|
|
- $DEPLOYEMENT_KEY
|
|
|
|
- $DEPLOYEMENT_KNOWN_HOSTS
|
|
|
|
- $DEPLOYEMENT_USER
|
|
|
|
- $DEPLOYEMENT_HOST
|
2018-02-28 15:55:41 +00:00
|
|
|
|
2018-09-21 21:00:42 +00:00
|
|
|
# Push new translations strings to https://trad.framasoft.org
|
2019-09-26 20:11:50 +00:00
|
|
|
trads:
|
|
|
|
stage: deploy
|
|
|
|
image: framasoft/push-trad:latest
|
|
|
|
script:
|
|
|
|
- sed -e "s@<project-version>.*</project-version>@<project-version>$CI_COMMIT_REF_SLUG</project-version>@" -i zanata/zanata.xml
|
|
|
|
- sed -e "s@<project>.*</project>@<project>join-peertube</project>@" -i zanata/zanata.xml
|
|
|
|
- cp -n zanata/zanata.xml zanata.xml
|
|
|
|
- mkdir -p ${HOME}/.config; echo -e "${ZANATA_CONFIG_FRAMABOT}" > ${HOME}/.config/zanata.ini;
|
|
|
|
- make push-locales;
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
variables:
|
|
|
|
- $ZANATA_CONFIG_FRAMABOT
|