FoundKey/.circleci/config.yml
2018-10-29 21:48:35 +09:00

60 lines
1.7 KiB
YAML

version: 2
general:
branches:
ignore:
- l10n_develop
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: |
docker build -t misskey:latest .
- 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