forked from requarks/wiki
-
Notifications
You must be signed in to change notification settings - Fork 1
/
wercker.yml
92 lines (89 loc) · 2.61 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
build:
box: node:8
steps:
- script:
name: install dependencies
code: |
apt-get update
apt-get install build-essential -y
npm install -g yarn
- 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
- script:
name: purge dev files
code: |
yarn install --production --ignore-scripts --prefer-offline
deploy-docker-master:
box: node:8-alpine
steps:
- script:
name: install dependencies
code: |
apk update
apk add bash curl git openssh
- script:
name: copy app files
code: |
mkdir -p /var/wiki
cp -LR assets node_modules server config.sample.yml package.json LICENSE /var/wiki
rm -rf /pipeline
- internal/docker-push:
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
tag: latest, master
ports: "3000"
working-dir: /var/wiki
entrypoint: node server
env: "WIKI_JS_HEROKU=1"
repository: requarks/wiki
registry: https://registry.hub.docker.com
deploy-docker-dev:
box: node:8-alpine
steps:
- script:
name: install dependencies
code: |
apk update
apk add bash curl git openssh
- script:
name: copy app files
code: |
mkdir -p /var/wiki
cp -LR assets node_modules server config.sample.yml package.json LICENSE /var/wiki
rm -rf /pipeline
- internal/docker-push:
username: $DOCKER_HUB_USERNAME
password: $DOCKER_HUB_PASSWORD
tag: dev
ports: "3000"
working-dir: /var/wiki
entrypoint: node server
repository: requarks/wiki
registry: https://registry.hub.docker.com
deploy-github:
box: node:8
steps:
- script:
name: package
code: |
tar -chzf wiki-js.tar.gz assets server config.sample.yml package.json wiki.js LICENSE
tar -chzf node_modules.tar.gz node_modules
SEMVER_NEXT=`curl --request POST --url https://beta.requarks.io/api/version/increment --header "authorization: $WIKIJSORG_TOKEN" --header 'cache-control: no-cache' --header 'content-type: application/json' --data '{"channel": "stable"}'`
- github-create-release:
token: $GITHUB_TOKEN
tag: "v${SEMVER_NEXT}"
prerelease: true
title: "$SEMVER_NEXT Release"
- github-upload-asset:
token: $GITHUB_TOKEN
file: wiki-js.tar.gz
- github-upload-asset:
token: $GITHUB_TOKEN
file: node_modules.tar.gz