Date: Thu, 28 Mar 2024 23:21:25 +1100 (AEDT) Message-ID: <971709591.1431.1711628485190@SYDWEB02> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1430_1251252204.1711628485189" ------=_Part_1430_1251252204.1711628485189 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Note the > operator tells us we're sending file= s from the server to the agent.
[1.1] Test\** &= gt; Output [1.2] Test\** -> OutputFlattened [1.3] Test\** >> OutputEmptied [1.4] Test\** ->> OutputEmptiedFlattened
Each rule will find all files in the Test dir= ectory in the server's workspace and copy them to the agent's workspace dir= ectory.
[1.1] - Puts files and directories in \Output. Preserve= s the directory structure.
[1.2] - Traverse the entire directory structure of Test and put all files matched into the \OutputFlattened directory on the agent. Also so known as flattening the files.
[1.3] - Before copying the files and preserving their path, make sure \OutputEmpied is actually empty.
[1.4] - Before copying the files and flattening them, make sure
Note the < operator tells us we're se= nding files from the agent to the server .
[2.1] Test <= Output\** [2.2] TestFlattened\ <- Output\** [2.3] TestEmptied\ << Output\** [2.4] TestEmptiedFlattened\ <<- Output\**
Each rule will find all files in the Output direct= ory in the agent's workspace and copy them to the server's workspace direct= ory.
[2.1] - Puts files and directories in \Test. Preserves = the directory structure.
[2.2] - Traverse the entire directory structure of Output&n= bsp;and put all files matched into the \TestFlattened = ;directory on the server. Also so known as flattening the fil= es.
[2.3] - Before copying the files and preserving their path, make sure&nb= sp;\TestEmpied is actually empty.
[2.4] - Before copying the files and flattening them, make sure
The example rules below all use the preserve operator > or <, for these examples it's not the operator= that's important so we've just used any.
[3.1] Test\* &g= t; Output [3.2] Test\image_?.png > Output [3.3] Test\*.??? > Output [3.4] Test\*\**.dll > Output [3.5] Test\**.xml > Output
[3.1] - Matches any files (not directories) in the serv= er's \Test directory and puts them in the agent's = \Output directory.
[3.2] - Matches any files with the name "image_" follow= ed by a single character, followed by ".png" and puts them= in the agent's \Output directory.
[3.3] - Matches any files (not directori= es) in the server's \Test directory which end wi= th a period "." followed by 3 characters. It basically mat= ches any files that have a 3 character long file extension.<= /p>
[3.4] - Matches any files ending with ".dll"= and are two directories down from the server workspace's \Tes= t directory. The first wild card matches a single level of directo= ries.
[3.5] - Matches any files ending with ".xml" anywhere u= nderneath the server workspace's \Test directory.
Using the preserve paths operator won't preserve the entire path of the = file that's matched. It will only preserve paths matched by the directories= the wild card matches. If you specify a directory name with no wildcards i= n your pattern and that directory comes before any wildcards, then to keep = that exact structure you must put those directories in the destination path= .
[4.1] Test\**.x= ml > Output [4.2] Test\Stuff\**.xml > Output # Notice how the destination pattern directories mimic the non-wildcard dir= ectories in the source pattern. [4.3] Test\**.xml > Output\Test [4.4] Test\Stuff\**.xml > Output\Test\Stuff
[4.1] and [4.2] - Any files matched are put in the \Output<= /strong> directory and the directory they were found in will be created in<= strong> \Output.
[4.3] - Any files matched are put in the \Output\Test<= /strong> directory and the directory they were found in will be create= d in \Output\Test.
[4.4] - Any files matched are put in the \Output\Test\= Stuff directory and the directory they were found in will be = created in \Output\Test\Stuff .
The root of the workspace can be specified by either a forward slash "/" or a backslash "\".
[5.1] AppInstal= lers*.exe > / [5.2] / < AppInstallers*.exe
[5.1] - Matches any files in the root of the server's workspace that sta= rt with "AppInstallers" and ends with ".exe" and puts them in the agent's workspace root.
[5.2] - Matches any files in the root of the agent's workspace= that start with "AppInstallers" and ends with ".e= xe" and puts them in the server's workspace root.
Exclude rules are grouped by direction (Server to Agent/Agent to Server)= and applied to all include patterns that match the direct= ion.
[6.1a] Output\*= * > LotsOfStuff [6.1b] - Output\**.xml >=20 [6.2a] Installers < Output\** [6.2b] - < Output\**.xml [6.2c] - < Output\**.dll
[6.1a] and [6.1b] execute together. The server pattern Outp= ut\** starts generating a list of files it matches, as a= match is found it's checked against every exclude pattern, in this example= there is only one Output\**.xml. The result of combining = these two rules is every file in the server's \Output dire= ctory is copied to the agent's \LotsOfStuff directory exce= pt for files that end with ".xml".
[6.2a], [6.2b] and [6.2c] also executed together. The agent pattern= Output\** starts generating a list of files it matches, as a match is foun= d it's checked against the two exclude patterns [6.2b] and [6.2c]= . This example will copy all files in Output\ except for t= hose that end with ".xml" or ".dll" and p= uts them in the \Installers directory on the server-side w= orkspace.
Add the colon ":" operator after the zip extension on the left-hand side= of a server-to-agent rule to specify that the archive file should be extra= cted. Note that only zip archive files are currently supported.
7.1 Report.zip:= > Report/ExtractedFiles 7.2 Report.zip: -> Report/ExtractedFlattened 7.2 Report.zip: >> Report/ExtractedFiles 7.2 Report.zip: ->> Report/ExtractedFlattened
The archive file in the server workspace is automatically extracted afte= r being copied to the agent workspace. Note that the operators for preservi= ng and emptying the destination folder are also taken into account when ext= racting. Also note that archive files can only be extracted when copying fr= om the server workspace to the agent workspace.
[7.1] - Extracts all the files in the archive Report.zip to the folder Report/ExtractedFiles. Preserves the direc=
tory structure within the zip file.
[7.2] - Extracts all the files in the archive Report.zip =
to the folder Report/ExtractedFlattened. Flattens the zip =
directory structure so that all files are extracted directly to Rep=
ort/ExtractedFlattened.
[7.3] - Extracts all the files in the archive Report.zip =
to the folder Report/ExtractedFiles. Empties the destinati=
on folder before extracting files.
[7.4] - Extracts all the files in the archive Report.zip =
to the folder Report/ExtractedFlattened. Empties the desti=
nation folder before extracting files. Flattens the zip directory structure=
so that all files are extracted directly to Report/ExtractedFlatte=
ned.
You can also add a pattern to specify which files to extract from the se= rver archive file.
8.1 Report.zip:= /*.html > ReportHtmlFiles 8.2 Report.zip:/**.html > Report/HtmlFiles 8.3 Report.zip:/Main/**.xml > MainReport/XmlFiles 8.4 Report.zip:/Report/**/Main/**.html > MainReport/HtmlFiles
[8.1] - Extracts all the html files in the root folder =
of the archive Report.zip to the folder ReportHtml=
Files. Preserves the directory structure within the zip file.
[8.2] - Extracts all the html files in the archive
[8.3] - Extracts all the xml files under the Main folder =
in the archive Report.zip to the folder MainReport=
/XmlFiles. Preserves the directory structure under the Main folder=
within the zip file.
[8.4] - Extracts all the html files under the Report fold=
er in the archive Report.zip which are under a sub-folder =
named Main to the folder MainReport/HtmlFiles. Preserves t=
he directory structure under the Report folder within the zip file.
Specifying a zip file extension on the left-hand side of a agent-to-serv= er rule means that the agent files should be compressed. The colon = ":" after the zip name operator is optional, but can be used to sp= ecify a destination sub-folder (see 10. below). Note that only zip archive = files are currently supported.
9.1 Report.zip = < Report/Files/** 9.2 Report.zip: < Report/Files/*.html 9.3 Report.zip: <- Report/Files/**.html 9.4 Report.zip: << Report/**/Main/*.xml
The matching files in the agent workspace are compressed to an archive f= ile which is then copied to the server workspace. Note that the operators f= or preserving and emptying the destination folder are also taken into accou= nt when extracting. Also note that files can only be compress to an archive= when copying from the agent workspace to the server workspace.
[9.1] - Compress all the files under the folder Report/Files to the archive Report.zip. Preserve=
s the directory structure under Report/Files when adding f=
iles to the zip file. You can also defined a sub-folder within the zip file to compress the fi=
les to. The matching files in the agent workspace are compressed to the specifie=
d subfolder in the archive file which is then copied to the server workspac=
e. [10.1] - Compress all the files under the folder Report/Files to the MainReport sub-folder in the archive=
Report.zip. Preserves the directory structure under Repor=
t/Files when adding files to the zip file.
[9.2] - Compress all the html files directly in the folde=
r Report/Files to the archive Report.zip.=
Preserves the directory structure under Report/Files when=
adding files to the zip file.
[9.3] - Compress all the html files under the folder
[9.4] - Compress all the xml files directory under the fo=
lder Report directly under a sub-folder named Main=
to the archive Report.zip. Preserves the directory structure unde=
r Report when adding files the zip file. Deletes any exist=
ing Report.zip files created in previous rules and creates a new zip file.<=
/p>
10. Compressing archives to a sub-folder within an archive
Rule Example Type 10 - Archive creating rules with sub-folder
10.1 Report.zip=
:MainReport < Report/Files/**
10.2 Report.zip:MainReport/Html < Report/Files/**.html
[10.2] - Compress all the html files under the folder Report/Files=
the MainReport/Html sub-folder in the archive Report.zip. Preserves the directory structure under =
Report/Files when adding files to the zip file.