This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.js
96 lines (82 loc) · 2.85 KB
/
default.js
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
93
94
95
96
'use strict';
module.exports = {
NODE_ENV: 'production',
LOG_LEVEL: 'error',
DEBUG: false,
// Port the server is listening on.
port: 8080,
// Bind to specific interface (0.0.0.0 for all).
bind: '127.0.0.1',
// Path where to store data (checkout, build-logs etc)
dataPath: '/opt/git-deploy',
// Private data: Repositories, pid-files etc.
// Resolved against dataPath.
privatePath: 'private',
// Public files: Logfiles and build-data.
// Resolved against dataPath.
publicPath: 'public',
// WWW-Root. A build's output will be linked here.
// Resolved against dataPath.
// See also target.www.
wwwPath: 'www',
// Run the following services. At least gitlab is required.
// Dashboard and builds are optional. It's preferable to serve the builds
// via an external webserver.
// Each entry contains a name, that must resolve to a file in src/service.
// Also it contains the URL the service is mounted under.
services: [
{
name: 'gitlab',
url: '/hooks/gitlab',
},
{
name: 'dashboard',
url: '/dashboard',
// optional: Specify a template (mustache) for index.html
template: 'src/html/index.tpl.html',
},
//{ name: 'builds', url: '/' },
],
// Repository configuration. Each entry's key must be the full name gitlab
// sends, means: <username>/<repositoryname>.
repos: {
'myaccount/fancy-app': {
// A short name. If none will be given, full key (myaccount/fancy-app here)
// is used.
// The result will be slugified, so it contains no path separators anymore.
// We need a flag folder structure.
name: 'fancy-app',
// If given, use that secrect.
secret: '00000000-0000-0000-0000-000000000000',
// Targets. Each target is checked against the ref sent with the hook,
// and the first matching is used.
targets: [
{
// Regular expression to match current ref against.
match: /^refs\/tags\/rc(.+)$/,
// Path can contain interpolations from the match (%1, %2 etc) and
// creates a folder structure in config.privatePath, config.publicPath
// and config.wwwPath.
// The path will be combined from the name of the repo and this
// expression here. It will be slugified to contain no slashes or dots,
// so it does not contain any structural information, neither for subdomains
// nor for paths.
path: '%1',
// Where to find the actual build results. If not set, no link will be
// created (e.g. backends).
www: 'build',
// Scripts to run after updating.
// Can be a single string, or an array.
// If an entry refers to a .js-file, the script is run via fork().
// Otherwise the command is run in a shell via spawn().
// If an entry is an array, it's run as [cmd, ...args].
// Means: These both are possible:
postupdate: [
'npm install --production',
['npm', 'prune', '--production'],
],
},
],
},
},
};