-
Notifications
You must be signed in to change notification settings - Fork 36
/
example.env
338 lines (275 loc) · 13.1 KB
/
example.env
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## ##
## USE THIS FILE ON THE SERVER ##
## ##
## ! rename this file to .env ! ##
## ##
## - this file contains all environment variables which ##
## are required for the CICD server to run. ##
## - variable names must be in uppercase. ##
## ##
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
CICD_ORGANIZATION=service now customer
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# WEB UI
#
# FQDN of the CICD server under which the server is reachable in the network [localhost]
CICD_WEB_HOST_NAME=localhost
# port under which the server is reachable in the network (for HTTP protocol) [8080]
CICD_WEB_HTTP_PORT=8080
# port under which the server runs locally.
CICD_WEB_HTTP_PORT_INTERNAL=8080
# port under which the server is reachable in the network (port for HTTPS protocol). if enabled, requests to http:// are redirected to https://
CICD_WEB_HTTPS_PORT=8443
# port under which the server runs locally.
CICD_WEB_HTTPS_PORT_INTERNAL=8443
# to run a custom WEB-UI, point to custom web root [node-modules/sn-cicd/web']
CICD_WEB_DIR=
# HTTPS certificate information, [cert from '/cert' dir]
#CICD_WEB_HTTPS_KEY=/opt/cicd/cert/server-key.pem
#CICD_WEB_HTTPS_CERT=/opt/cicd/cert/server-crt.pem
#CICD_WEB_HTTPS_CA=/opt/cicd/cert/server-ca-crt.pem
# FQDN for Build-Process to connect to CICD server
# set this in case the worker nodes are running on additional server (clustered setup)
# default to CICD_WEB_HOST_NAME:CICD_WEB_HTTP[S]_PORT - !!NOT synced with worker nodes!!
#CICD_GULP_HOST_FQDN=https://localhost:8443
# directory to place the nedb files [process.cwd()/'db']
#CICD_INTERNAL_DB_DIR=C:/temp/db
# directory to place the ServiceNow code extraction [temp/git-root]
#CICD_CODE_DIRECTORY=C:/temp/repos
# temp directory for zip extraction [temp/temp-build]
#CICD_TEMP_DIRECTORY=C:/temp/temp-build
# build results directory (static exposed under /doc) [temp/doc-root]
#CICD_DOC_DIRECTORY=C:/temp/doc-root
# the mongo url inc credentials and database name - !!NOT synced with worker nodes!!
CICD_DB_MONGO_URL=mongodb://user:passwd@localhost:27017/cicd
# connection pool size
CICD_DB_MONGO_POOL_SIZE=10
# use the mongo-express UI under /mongo_express
CICD_DB_MONGO_EXPRESS_UI_ENABLED=true
# basic auth creds for this page
CICD_DB_MONGO_EXPRESS_UI_USER=web-user
CICD_DB_MONGO_EXPRESS_UI_PASSWORD=password
# connect as admin to the mongo db. this displays more admin features in the ui
#CICD_DB_MONGO_EXPRESS_ADMIN_USER=admin
#CICD_DB_MONGO_EXPRESS_ADMIN_PASSWORD=password
# in case graceful shutdown needs to be disabled, set this to true [false]
CICD_GRACEFUL_SHUTDOWN_DISABLED=false
# max wait time for jobs to finish before shutting down the server [20]
CICD_GRACEFUL_SHUTDOWN_TIMEOUT_MINUTES=20
# the Kubernetes liveness port for probes available under /health, /live, /ready [9000]
CICD_K8S_LIVENESS_PORT=9001
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Proxy
#
# Proxy settings in case server runs behind a company proxy
#PROXY_HTTPS_PROXY=
#PROXY_STRICT_SSL=false
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# EVENT BUS [WEBSOCKET]
#
# FQDN of the EventBus server to which the EventBus - Worker connect [localhost] - !!NOT synced with worker nodes!!
CICD_EB_HOST_NAME=localhost
# WebSocket port [4443]
CICD_EB_HOST_PORT=4443
# Event Bus Server settings (WebSockets), [cert from '/cert' dir]
#CICD_EB_HOST_SERVER_KEY=/opt/cicd//cert/eb-server-key.pem
#CICD_EB_HOST_SERVER_CERT=/opt/cicd/cert/eb-server-crt.pem
#CICD_EB_HOST_SERVER_CA=/opt/cicd/cert/eb-ca-crt.pem
# Event Bus Client settings (WebSockets), [cert from '/cert' dir] - !!NOT synced with worker nodes!!
#CICD_EB_HOST_CLIENT_KEY=/opt/cicd/cert/eb-client-key.pem
#CICD_EB_HOST_CLIENT_CERT=/opt/cicd/cert/eb-client-crt.pem
#CICD_EB_HOST_CLIENT_CA=/opt/cicd/cert/eb-ca-crt.pem
# Number of workers to be stared [require('os').cpus().length] - !!NOT synced with worker nodes!!
# If the server is started via pm2, set this to 0 and start app.js
#CICD_EB_WORKER_CLUSTER_NUM=2
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# CODE EXPORT
#
# Run update set collision detection at first - aka PREFLIGHT
CICD_CONFLICT_DETECTION_ENABLED=true
# set this to 'true' to only allow to run conflict detection as specified below
CICD_STRICT_CONFLICT_DETECTION=false
# default conflict detection host
CICD_CONFLICT_DETECTION_TARGET=''
# conflict detection target definition
CICD_CONFLICT_DETECTION_TARGET_DEVINSTANCE=testcompany.service-now.com
# CICD API Prefix. If you have your own version of the 'CICD Integration' application in ServiceNow, name here the scope prefix
CICD_APP_PREFIX=devops
# toggle export records which do not contain JavaScript [true]
CICD_EXPORT_UNKNOWN_TYPES=true
# toggle to always crate .json files, this helps to better track changes [true]
CICD_EXPORT_ALL_AS_JSON=true
# treat empty fields as null values. ServiceNow does not allow to detect if a field is null or empty.
CICD_EXPORT_NULL_FOR_EMPTY=true
# only add following sys_* field in JSON files (helps reducing the noise in pull request)
CICD_EXPORT_SYS_FIELD_WHITELIST=sys_class_name, sys_created_by, sys_created_on, sys_id, sys_mod_count, sys_name, sys_package, sys_policy, sys_scope, sys_update_name, sys_updated_by, sys_updated_on
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# SLACK INTEGRATION
#
# toggle slack integration
CICD_SLACK_ENABLED=false
# webhook url
#CICD_SLACK_WEBHOOK=https://hooks.slack.com/services/..................
# override the channel of the webhook
#CICD_SLACK_CHANNEL_OVERRIDE=@user_name
#CICD_MS_TEAMS_WEBHOOK=https://outlook.office.com/webhook/.............
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# EMAIL INTEGRATION
#
# toggle email integration
CICD_EMAIL_ENABLED=false
# the email server host name
CICD_EMAIL_HOST=mail.company.com
# the email server port
CICD_EMAIL_PORT=465
# credentials if required
CICD_EMAIL_USER_NAME=
CICD_EMAIL_USER_PASSWORD=
# use TLS
CICD_EMAIL_SECURE=false
# senders address
CICD_EMAIL_FROM=noreply@company.com
# additional admin email address(es) to inform on deployment issues (email:to) - email to developer is always sent
CICD_EMAIL_ADMINS=
# admin email address(es) to inform on deployment issues (email:cc)
CICD_EMAIL_ADMINS_CC=
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# GIT
#
# override the git settings normally used in run(application.git)
CICD_GIT_HOST=ssh://git@github.com/user/
CICD_GIT_URL=https://github.com/user/
# link to the branch template
CICD_GIT_BRANCH_LINK_TEMPLATE=${url}/tree/${branchName}
# override the system git user settings
#CICD_GIT_USER_NAME=User Name
#CICD_GIT_USER_EMAIL=user@name.com
# credentials used for HTTPS connections to git origin
CICD_GIT_USER_PASSWORD=
# whether to store the credentials in ~/.git-credentials or not [boolean]
CICD_GIT_USE_CRED_STORE=
# create a local git repo
CICD_GIT_ENABLED=true
# raise a pull request if build pass
CICD_GIT_PR_ENABLED=true
# delete update-set branch on merge
CICD_GIT_DELETE_BRANCH_ON_MERGE=true
# ---- Master Environment Mapping ----
# use below settings to hard-link a development environment to a production environment (master)
# if enabled, the 'git' information in the 'run' request from ServiceNow is not required.
#
# set this to 'true' to only allow to checkout fom master like specified below
CICD_GIT_STRICT_MASTER=true
# default git master source (can be dangerous if you have multiple purpose instances. eg. IT and Finance)
CICD_GIT_MASTER_SOURCE=dev99999.service-now.com
# master source definition CICD_GIT_MASTER_SOURCE_[INSTANCENAME] (instance short name)
# this reads: if source is 'development.service-now.com', use 'prod.service-now.com' as the master
#CICD_GIT_MASTER_SOURCE_DEVELOPMENT=prod.service-now.com
#CICD_GIT_MASTER_SOURCE_TESTING=prod.service-now.com
#CICD_GIT_MASTER_SOURCE_PREPROD=prod.service-now.com
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ATF
#
# in case puppeteer is configured to not automatically download chromium,
# set this to a copy of chromium (see .npmrc)
#CICD_ATF_BROWSER=C:/temp/browsers/chrome-latest/chrome.exe
# run ATF test [true]
CICD_ATF_ENABLED=true
# set below to true if you want to see the puppeteer window (headless=false)
CICD_ATF_SHOW_BROWSER_WINDOW=false
# set this to false to protect ATF runs being executed on production environment (master env is seen as 'prod')
CICD_ATF_RUN_ON_PRODUCTION=false
# 4hrs max timeout
CICD_ATF_EXECUTION_TIMEOUT_SEC=14400
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# CREDENTIALS
#
# instance specific credentials can be set like
# CICD_[ATF]_[INSTANCENAME]_[TEST_USER_NAME]
# if not specified the default is used CICD_[ATF]_[TEST_USER_NAME]
CICD_ATF_TEST_USER_NAME=admin
CICD_ATF_TEST_USER_PASSWORD=********
# example for instance specific credentials
#CICD_ATF_TEST_INSTANCENAME_USER_NAME=
#CICD_ATF_TEST_INSTANCENAME_USER_PASSWORD=
# user to load update-set form 'source' and 'master'
CICD_CI_USER_NAME=admin
CICD_CI_USER_PASSWORD=********
# example for instance specific credentials
#CICD_CI_INSTANCENAME_USER_NAME=CI-USER-NAME
#CICD_CI_INSTANCENAME_USER_PASSWORD=
# user to deploy update-set to 'target'
# this user must have the 'admin' role
CICD_CD_USER_NAME=admin
CICD_CD_USER_PASSWORD=********
# example for instance specific credentials
#CICD_CD_INSTANCENAME_USER_NAME=CD-USER-NAME
#CICD_CD_INSTANCENAME_USER_PASSWORD=
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# BUILD
#
# se this to false if you run the build on a build server e.g. GitLabCi / Bamboo / Jenkins
CICD_EMBEDDED_BUILD=true
# access token to secure the /build api (a little bit)
CICD_BUILD_ACCESS_TOKEN=1Tnt2bx9mrVjxMQDfjhvRAYxiL9ldQN5ITR6DtM8T6Pq8YLbEjwAd60vmUiTIvSE
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# DEPLOY
#
# access token to secure the /deploy api (a little bit)
CICD_DEPLOY_ACCESS_TOKEN=Em5gEFz0acpVwbRWwfXNy0emDiJTG1MsL4KgkLn4EGsNpCHAS13yuTnLH48dgTrL
# automatically deploy update set to target if build pass (if CICD_GIT_PR_ENABLED is false)
CICD_CD_DEPLOY_ON_BUILD_PASS=false
# automatically deploy update set to target if pull request resolve
CICD_CD_DEPLOY_ON_PR_RESOLVE=true
# deploy update set from GIT repo instead from source service now environment
CICD_CD_DEPLOY_FROM_GIT=true
# always deploy all changes captured over time in GIT in a merged way. This is identical to Application Deploy (from Store) in ServiceNow OOB
# this setting can be overruled in the build payload (application.mergedDeployment in initial request).
#
# * requires CICD_CD_DEPLOY_FROM_GIT to be true
CICD_CD_DEPLOY_ALWAYS_MERGED=true
# never deploy merged if the update set is called EMERGENCYFIX:... or FIX:...
CICD_FIX_UPDATE_SET_DEPLOYMENT_MATCHING=/^(?:EMERGENCY)?FIX:.*$/
# always ensure the new records are deployed - even if there is a newer on the target environment
# this setting can be overruled in the build payload (application.forcedDeployment in initial request).
#
# * requires CICD_CD_DEPLOY_FROM_GIT to be true
CICD_CD_DEPLOY_ALWAYS_OVERWRITE=false
# records of this type will automatically be skipped on deployment conflicts
# - changes coming in to a environment will be IGNORED if there is a newer change
#
# list of 'remote update' names STARTING with this string
CICD_CD_DEPLOY_ALWAYS_SKIP_CONFLICTS=sys_properties,sys_data_source,ldap_server_config,sys_rest_message_fn,sys_soap_message_function
# records of this type will automatically be ignored on deployment conflicts
# - changes coming in to a environment will always be ACCEPTED regardless if there is a newer change
#
# list of 'remote update' names STARTING with this string
CICD_CD_DEPLOY_ALWAYS_IGNORE_CONFLICTS=
# don't stop deployment in case of delete of following types:
# sys_dictionary
# sys_db_object
# var_dictionary
# svc_extension_variable
# wf_activity_variable
# atf_input_variable
# atf_output_variable
# sys_atf_variable
# sys_atf_remembered_values
CICD_CD_DEPLOY_ALWAYS_IGNORE_DATA_LOSS=true
# ---- Deployment Environment Mapping ----
# use below settings to hard-link a source environment to a target environment
# if enabled, the 'target' information in the 'run' request from ServiceNow is not required.
#
# set this to 'true' to only deploy according to the below target definition
CICD_CD_STRICT_DEPLOYMENT=true
# default deployment target (can be dangerous if you have multiple purpose instances. eg. IT and Finance)
CICD_CD_DEPLOYMENT_TARGET=''
# deployment target definition
CICD_CD_DEPLOYMENT_TARGET_DEVINSTANCE=testcompany.service-now.com
CICD_CD_DEPLOYMENT_TARGET_TESTINSTANCE=preprodcompany.service-now.com
CICD_CD_DEPLOYMENT_TARGET_PREPRODINSTANCE=company.service-now.com
## Others
# on build tool set commit it to CICD_COMMIT_ID to have gulpfile.js access to the information in CICD server
# if not available, process will try to find last commit id via git (needs to be installed too on build server)
# CICD_COMMIT_ID=xxxx