-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.deploy
More file actions
267 lines (242 loc) · 9.44 KB
/
Copy pathexample.deploy
File metadata and controls
267 lines (242 loc) · 9.44 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#
# This is a reference and example of a .deploy file used by the uespdeploy.py
# script. It contains information used to deploy/install a source path to
# one or more destinations on a local or remote server.
#
# By default uespdeploy.py looks for the uesp.deploy file in the current
# directory unless this is overridden by a manually specified file.
#
# Comments
# Anything after the first '#' on a line is ignored.
#
# Case Sensitivity
# The variable name on the left of the '=' is case insensitive but the
# value on the right may be case sensitive depending on the particular data.
#
# Command Line Override
# Some of the values contained in a .deploy file can be overriden by
# command line parameters specified to uespdeploy.py.
#
#
# name = value
# Specifies a short name identifying the source being deployed. This can
# the repository name but doesn't have to be.
#
name = uesp.scripts
#
# description = value
# A longer description of the source being installed.
#
description = Collection of various scripts used by the UESP
#
# repository = url
# A link to the hg remote repository. This is required if a clean install
# or clone of the repository needs to be performed.
#
repository = https://github.com/uesp/uesp-scripts
#
# staged = true | false
# If set to false (the default) then files will be copied directly to each
# destination path. When set to true the files will be copied to a temporary
# directory and only moved to the destination at the very end of the
# deployment (assuming no errors occurred). Staging is useful for larger
# and more complex installations where failure mid-deployment could break
# the application or if updating a live-application is not desired.
#
# Note that all staged deployments are backed up by default as the original
# destination directory is renamed to the backup path (on the destination server).
#
staged = true
#
# backup = true | false
# A boolean value indicating whether a backup of the original destination
# files should be performed. Default value is false. This value can be
# overridden by the command line parameters.
#
# Note that a staged deployment is always backed up.
#
backup = false
#
# backuppath = path
# The path to save backups to if required. By default this is /deploytmp/ and each
# backup saved there will be under a unique path name using the name of the
# deployment source and the current timestamp.
#
# Note that for a staged deployment the backup will be stored on the destination
# server. For an un-staged deployment the backup is made on the local server.
#
backuppath = /deploytmp/
#
# verbosity = integer
# A number from 0 to 3 indicating how much information to output to stdout.
# The larger the number the more that is displayed. Typically a value of 0
# or 1 is useful for general operation and 2 or 3 for debugging.
#
verbosity = 0
#
# ignore = filespec
# You can have multiple ignore line which specifies a file or files to ignore
# when copying the source to the destination or to the backup. This is simply a
# file specification which will be relative to the source path. The usual shell
# wildcards of * and ? are supported.
#
ignore = *.deploy
ignore = .hg*
ignore = .git*
#
# source = path
# Specifies the source path to install the files from. This will usually be
# a local path relative to the deploy file. It is overruled by the source
# parameter on the command line.
#
source = ./
source = ./wiki/
source = /home/dave/uesp.test/
#
# dest = path
# dest = servername:/path
# There will be one or more dest lines to specify a deployment destination. This
# can be a local absolute path or a remote path including server name. Generally
# the full remote path is preferred as the source may be deployed from multiple
# locations on different servers. The destination path will be created if it does
# not exist.
#
# If the destination path is the special value of '/dev/null' then no files
# will be deployed but other commands (chown, chmod, create path, copy files,
# etc...) will be run on the server.
#
dest = content1.uesp.net:/home/uesp/scripts/
dest = content2.uesp.net:/home/uesp/scripts/
dest = content3.uesp.net:/home/uesp/scripts/
dest = /home/uesp/scripts/
dest = files1.uesp.net:/dev/null
#
# destname = [name]servername:/path
#
# Defines named destinations that will only be run if specifically called for at
# the command line with the format:
#
# uespdeploy name
#
# Note that "all" is a special name which matches all named destinations.
#
destname = [dev]/home/uesp/dev/www/
destname = [backup]backup1.uesp.net:/home/backup/
#
# chown_source = chown params
# This command simply takes the same parameters as the 'chown' shell command to
# change the ownership of files/directories in the source path before deployment.
# Generally you wish to change the ownership of all files to :uespadmin to ensure
# all admin users can edit or update the deployment in the future. Multiple lines
# of this command are permitted.
#
# NOTE: This feature requires the user to have sudo rights to chown
#
chown_source = :uespadmin -R ./
chown_source = :uespadmin somefile.txt
#
# chown_dest = chown params
# This is nearly identical to the chown_source command except it takes 'chown'
# commands to change the ownership of files on each destination. The value of
# '{dest}' is replaced with the destination path.
#
# NOTE: This feature requires the user to have sudo rights to chown
#
chown_dest = :uespadmin {dest}somefile.txt
chown_dest = :uespadmin {dest} # Change the ownership of the root path
#
# chmod_source = chmod params
# This command simply takes the same parameters as the 'chmod' shell command to
# change the ownership of files/directories in the destination path. Generally you
# wish to change the ownership of all files to be world readable but some files may
# need to be only readable by the apache user and the uespadmin group. Multiple
# lines of this command are permitted.
#
# NOTE: This feature requires the user to have sudo rights to chmod
#
chmod_source = g+rw somefile.txt
chmod_source = o-rwx -R ./
chmod_source = g+rw,a+r ./
#
# chmod_dest = chmod params
# This is nearly identical to the chmod_source command except it takes 'chmod'
# commands to change the ownership of files on each destination. The value of
# '{dest}' is replaced with the destination path.
#
# NOTE: This feature requires the user to have sudo rights to chmod
#
chmod_dest = g+rwx {dest}somefile.txt
chmod_dest = o-rwx {dest}
chmod_dest = a+r -R {dest}
#
# delete_dest = filespec
# Deletes specific files from each destination as given by the file specification.
# This is used to delete old and unused files from an existing installation.
# Nothing happens if the file does not exist.
#
# Note that the deletion is not recursive and care should be taken to not delete
# something you shouldn't or anything outside of the destination path.
#
delete_dest = test/tmp.txt
delete_dest = *.log
#
# manualcopy = servername: {source}filename1 {dest}filename2
# Manually copies files from the source to the destination after the initial
# deployment. Only copies files where "servername" matches the destination
# server (short servername names can be used so that 'content1' will match
# 'content1.uesp.net'). If servername is 'all' the file will be copied to all
# destinations. The values of {source}, {dest} and {destserver} will be
# replaced by the source path, destination path, and destination server name
# respectively.
#
# Note that the filename can be changed from the source to the destination
# if specified. This permits non-identical deployments depending on the
# server.
#
manualcopy = content1: {source}LocalSettings.php.content1 {dest}LocalSettings.php
manualcopy = content2: {source}LocalSettings.php.content2 {dest}LocalSettings.php
manualcopy = content3: {source}LocalSettings.php.content3 {dest}LocalSettings.php
manualcopy = all: {source}config.php.example {dest}config.php
manualcopy = content3: {source}path/somefile.txt {dest} # Keep the same filename on dest
manualcopy = content3: {source}path/subpath/* {dest}
manualcopy = all: {source}backupdb.sh {servername}:/etc/cron.daily/backupdb.sh
#
# addline = filename: string
# Use one or more of these commands to add a string to the end of a file on the
# destination(s) if it doesn't already exist in the file.
#
addline = LocalSettings.php : require_once( "$IP/extensions/Something/Something.php" );
#
# deployfile = name:/path/
# deployfile = name:/path/file.deploy
# Specifies another deploy file to run. Given path is relative to the source
# directory. If no filename is specified then 'uesp.deploy' is assumed. Note
# that the given deploy file is run in a completely separate instance reusing
# the same command line arguments except the source (-s) and deploy file (-f).
#
# The deploy name can be used on the command line to limit which of the deployfile
# lines are run. With the below example if we run uespdeploy like:
#
# uespdeploy test
#
# Then only the second deployfile entry named 'test' will be run.
#
# Note that "all" is a special name which matches all named deployments.
#
deployfile = wiki:/wiki/
deployfile = test:/debug/debug.deploy
#
# rundeployfiles = true | false
# When set to true all "deployfile" lines will be run by default except when a
# specific deployfile name is specified on the command line. When set to false
# "deployfile" lines will only be run when specifically named on the command line.
#
# Default is false.
#
rundeployfiles = false
#
# createpath = pathname
# Creates the specified absolute pathname on each destination.
#
createpath = /cachefiles
createpath = /var/log/wikilog