You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-7Lines changed: 64 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,16 @@ The main advantage of the module is the ability to publish all the Azure Data Fa
11
11
* Finding the **right order** for deploying objects (no more worrying about object names)
12
12
* Built-in mechanism to replace, remove or add the properties with the indicated values (CSV and JSON file formats supported)
13
13
* Stopping/starting triggers
14
-
* Dropping objects when not exist in the source (code)
15
-
* Filtering (include or exclude) objects to be deployed by name and/or type and/or folder
14
+
* Dropping objects when not exist in the source (code)
15
+
* (new!) Optionally can skip deletion of excluded objects
16
+
* Filtering (include or exclude) objects to be deployed by name and/or type **and/or folder** (new!)
16
17
* Filtering supports wildcards
17
18
* Publish options allow you to control:
18
19
* Whether stop and restarting triggers
19
20
* Whether delete or not objects not in the source
20
21
* Whether create or not a new instance of ADF if it not exist
21
22
* Tokenisation in config file allows replace any value by Environment Variable or Variable from DevOps Pipeline
23
+
* (new!) Allows to define multiple file (objects) by wildcarding
22
24
* Global Parameters
23
25
24
26
The following features coming in the future:
@@ -131,6 +133,9 @@ $opt = New-AdfPublishOption
131
133
*[Boolean]**DeployGlobalParams** - indicates whether deploy Global Parameters of ADF. Nothing happens when parameters are not defined. (default: *true*)
132
134
*[Boolean]**FailsWhenConfigItemNotFound** - indicates whether configuration items not found fails the script. (default: *true*)
*[Boolean]**DoNotStopStartExcludedTriggers** - specifies whether excluded triggers will be stopped before deployment (default: *false*)
137
+
*[Boolean]**DoNotDeleteExcludedObjects** - specifies whether excluded objects can be removed. Applies when `DeleteNotInSource` is set to *True* only. (default: *true*)
138
+
134
139
135
140
Subsequently, you can define the needed options:
136
141
@@ -191,11 +196,13 @@ Therefore, an extra character should be provided before the name/pattern:
191
196
trigger.*
192
197
-*.SharedIR*
193
198
-*.LS_SqlServer_DEV19_AW2017
199
+
-*.*@testFolder
194
200
```
195
201
196
202
The above file (if used) adds:
197
203
- 2 items to *Includes* list (line 1-2)
198
204
- 2 items to *Excludes* list (line 3-4)
205
+
- all items located in `testFolder` to *Excludes* list (line 5)
199
206
200
207
> The file should use UTF-8 encoding.
201
208
@@ -435,8 +442,10 @@ If you prefer using JSON rather than CSV for setting up configuration - JSON fil
435
442
436
443
437
444
## Step: Stoping triggers
438
-
This block stops all triggers which must be stopped due to deployment.
439
-
> Operation might be skipped when `StopStartTriggers = false` in *Publish Options*
445
+
This block stops all triggers which must be stopped due to deployment.
446
+
Since version 0.30 you can better control which triggers you want to omit from stopping. Only need to add such triggers to `Excludes` list and set flag `DoNotStopStartExcludedTriggers` to *true*.
447
+
448
+
> The step might be skipped when `StopStartTriggers = false` in *Publish Options*
440
449
441
450
## Step: Deployment of ADF objects
442
451
This step is actually responsible for doing all the stuff.
@@ -445,13 +454,61 @@ The mechanism is smart enough to publish all objects in the right order, thence
445
454
446
455
## Step: Deleting objects not in source
447
456
This process removes all objects from ADF service whom couldn't be found in the source (ADF code).
448
-
The mechanism is smart enough to dropping the objects in right order.
457
+
The mechanism is smart enough to dropping the objects in right order.
458
+
Since version 0.30 you can better control which objects you want to omit from removing. Only need to add such objects to `Excludes` list and set flag `DoNotDeleteExcludedObjects` to *true*.
449
459
450
-
> Operation might be skipped when `DeleteNotInSource = false` in *Publish Options*
460
+
> The step might be skipped when `DeleteNotInSource = false` in *Publish Options*
451
461
452
462
## Step: Restarting all triggers
453
463
Restarting all triggers that should be enabled.
454
-
> Operation might be skipped when `StopStartTriggers = false` in *Publish Options*
464
+
> The step might be skipped when `StopStartTriggers = false` in *Publish Options*
465
+
466
+
# Selective deployment, triggers and logic
467
+
468
+
Publishing only selected objects of ADF is not an easy thing. If you add dependencies between objects and a need of stopping triggers before deploying on top of that - the situation becomes even more difficult. Therefore, not always it might be obvious what would happen during the deployment while you have flags set up, an object exist (or not) in the source and/or a trigger is Enabled (or Disabled) on target ADF service where you deploy to.
469
+
All these factors:
470
+
* Does object exist in the source?
471
+
* Is trigger is Enabled in the target?
472
+
* What is the value for `DeleteNotInSource` flag?
473
+
* What is the value for `StopStartTriggers` flag?
474
+
* What is the value for `DoNotStopStartExcludedTriggers` flag?
475
+
* What is the value for `DoNotDeleteExcludedObjects` flag?
476
+
* Is an object on `Excludes` list?
477
+
478
+
had to be considered thoroughly, hence the following table arose:
479
+

480
+
481
+
## Assumptions
482
+
483
+
It's worth to explain a bit why the behaviour looks as above.
484
+
485
+
### StopStartTriggers
486
+
It allows you to decide. It stops ALL existing and `Started` (Enabled) triggers.
487
+
Generally you should use TRUE (default) if you want to avoid troubles.
488
+
However, if you choose FALSE - you must accept that process WILL NOT touch triggers. You can still do it for yourself in pre or post-deployment script.
489
+
490
+
### DoNotStopStartExcludedTriggers
491
+
In some scenarios, people still want to let process to manage of triggers, but with some exceptions.
492
+
Usage of this flag make sense along with `StopStartTriggers` only and some objects are excluded from deployment.
493
+
It guarantees that no objects (excluded) will be even touched in target service during the deployment.
494
+
495
+
### Excluded (collection)
496
+
This option should allow to completely separate group of objects from other group.
497
+
In that way you can keep all files in the source but control behaviour with flags.
498
+
Exclusion can be defined in two ways:
499
+
1) Explicitly in 'Excludes' collection
500
+
2) Implicitly by not adding an item in 'Includes' collection
501
+
502
+
**Important:** Both collections can use wildcards as the name of objects.
503
+
It simplify defining multiple objects by one line, or defining objects which does not exist yet.
504
+
These collections are very useful while you want to do a selective deployment.
505
+
506
+
### DoNotDeleteExcludedObjects
507
+
Excluded object can be deleted only if flag `DoNotDeleteExcludedObjects` = false.
508
+
This situation could cause error when trigger has not been deleted prior.
509
+
Otherwise, nothing will happen.
510
+
This option gives you a flexibility of deleting objects in the target, but still not touching objects from 'other' group.
0 commit comments