1
0
forked from mirror/misskey
misskey/.circleci/config.yml

61 lines
1.7 KiB
YAML
Raw Normal View History

2018-10-27 03:46:48 +09:00
version: 2
2018-10-29 21:48:35 +09:00
general:
branches:
ignore:
- l10n_develop
2018-10-27 03:46:48 +09:00
jobs:
webpack-build:
working_directory: /misskey
docker:
- image: yukimochi/misskey-builder:latest
steps:
- checkout
- run:
name: Setup Dependencies
command: |
yarn install
yarn global add web-push
- run:
name: Import default.yml
command: |
echo ${IMPORT_DEFAULT_YML} | base64 -d | gzip -d > .config/default.yml
- run:
name: Build Webpack
command: |
yarn run build
- run:
name: Compress clients
command: |
find ./built/client -name "*.js" -or -name "*.js.map" -or -name "*.css" -or -name "*.svg" -or -name "*.html" -or -name "*.json" | xargs -t gzip -k -9
find ./built/client -name "*.js" -or -name "*.js.map" -or -name "*.css" -or -name "*.svg" -or -name "*.html" -or -name "*.json" | xargs -t brotli -q 10
tar cfz ~/built-${CIRCLE_SHA1}.tar.gz built
- run:
name: Send built s3
command: |
mc config host add ykmc ${s3_endpoint} ${s3_accesskey} ${s3_secretkey}
mc cp ~/built-${CIRCLE_SHA1}.tar.gz ${backet}/${CIRCLE_BRANCH}/
docker-build:
docker:
- image: docker:17-git
steps:
- checkout
- setup_remote_docker
- run:
name: build docker image
command: |
2018-10-29 19:27:47 +09:00
docker build -t misskey:latest .
2018-10-27 03:46:48 +09:00
- run:
name: upload image to docker hub.
command: |
docker login --username=${DOCKER_USER} --password=${DOCKER_PASS}
docker push ${DOCKER_USER}/misskey:latest
workflows:
version: 2
build:
jobs:
- webpack-build
- docker-build