wikijs-fork/wercker.yml

78 lines
2.0 KiB
YAML
Raw Normal View History

2017-07-23 20:42:45 +00:00
build:
2017-08-11 23:54:16 +00:00
box: node:8
2017-07-23 20:42:45 +00:00
steps:
- script:
2017-07-23 20:51:15 +00:00
name: install dependencies
2017-07-23 20:42:45 +00:00
code: |
2017-07-23 20:51:15 +00:00
apk update
2017-08-11 23:54:16 +00:00
apk add bash build-base curl yarn
2017-07-23 20:42:45 +00:00
- script:
name: yarn install
code: |
yarn config set cache-folder "$WERCKER_CACHE_DIR/yarn"
yarn install
- script:
name: build
code: yarn run build
- npm-test
2017-08-11 23:45:53 +00:00
- script:
name: purge dev files
code: |
yarn install --production --ignore-scripts --prefer-offline
- script:
2017-08-11 23:54:16 +00:00
name: copy artifacts
code: |
ls
cp -LR assets node_modules server config.sample.yml package.json wiki.cmd wiki.js "$WERCKER_OUTPUT_DIR"
2017-07-24 01:50:50 +00:00
deploy-github:
2017-08-11 23:54:16 +00:00
box: node:8
2017-07-23 20:42:45 +00:00
steps:
- script:
name: package
code: |
tar -chzfv wiki-js.tar.gz * -X .build/.deployexclude
tar -chzfv node_modules.tar.gz node_modules
2017-07-24 01:50:50 +00:00
SEMVER_LAST=`npm show wiki.js version`
2017-07-24 01:59:31 +00:00
chmod +x ./.build/semver_next.sh
2017-07-24 01:50:50 +00:00
SEMVER_NEXT=`./.build/semver_next.sh -p $SEMVER_LAST`
- github-create-release:
token: $GITHUB_TOKEN
tag: "v${SEMVER_NEXT}"
prerelease: true
- github-upload-asset:
token: $GITHUB_TOKEN
file: wiki-js.tar.gz
- github-upload-asset:
token: $GITHUB_TOKEN
file: node_modules.tar.gz
2017-08-11 20:37:17 +00:00
deploy-docker-master:
2017-08-11 23:45:53 +00:00
box: node:8-alpine
2017-08-11 23:54:16 +00:00
- script:
name: install dependencies
code: |
apk update
apk add bash curl git openssh
2017-08-11 20:37:17 +00:00
steps:
2017-08-11 23:45:53 +00:00
- internal/docker-scratch-push:
2017-08-11 20:37:17 +00:00
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
tag: latest, master
ports: "3000"
entrypoint: node server
repository: requarks/wiki
registry: https://registry.hub.docker.com
deploy-docker-dev:
2017-08-11 23:45:53 +00:00
box: node:8-alpine
2017-07-24 01:50:50 +00:00
steps:
2017-08-11 23:45:53 +00:00
- internal/docker-scratch-push:
2017-07-24 01:50:50 +00:00
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
2017-08-11 20:37:17 +00:00
tag: dev
2017-07-24 01:50:50 +00:00
ports: "3000"
entrypoint: node server
repository: requarks/wiki
registry: https://registry.hub.docker.com