File tree Expand file tree Collapse file tree 3 files changed +54
-1
lines changed Expand file tree Collapse file tree 3 files changed +54
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
### Added
11
11
- LoadProductionsFromDirectory method to help custom deployment scripts load decomposed productions from the repository (#670 )
12
12
- Added ability to reset head / revert most recent commit (#586 )
13
+ - Changes deployed through Git are now logged in a new table SourceControl_Git.DeploymentLog
13
14
14
15
### Fixed
15
16
- Fixed not showing warnings on Studio (#660 )
Original file line number Diff line number Diff line change
1
+ Class SourceControl .Git .DeploymentLog Extends %Persistent [ Owner = {%Developer } ]
2
+ {
3
+
4
+ Property Token As %String [ InitialExpression = {$System .Util .CreateGUID ()} ];
5
+
6
+ Property StartTimestamp As %TimeStamp ;
7
+
8
+ Property EndTimestamp As %TimeStamp ;
9
+
10
+ Property HeadRevision As %String ;
11
+
12
+ Property Status As %Status ;
13
+
14
+ Storage Default
15
+ {
16
+ <Data name =" DeploymentLogDefaultData" >
17
+ <Value name =" 1" >
18
+ <Value >%%CLASSNAME </Value >
19
+ </Value >
20
+ <Value name =" 2" >
21
+ <Value >Token </Value >
22
+ </Value >
23
+ <Value name =" 3" >
24
+ <Value >StartTimestamp </Value >
25
+ </Value >
26
+ <Value name =" 4" >
27
+ <Value >EndTimestamp </Value >
28
+ </Value >
29
+ <Value name =" 5" >
30
+ <Value >HeadRevision </Value >
31
+ </Value >
32
+ <Value name =" 6" >
33
+ <Value >Status </Value >
34
+ </Value >
35
+ </Data >
36
+ <DataLocation >^SourceContro22B9 .DeploymentLogD </DataLocation >
37
+ <DefaultData >DeploymentLogDefaultData </DefaultData >
38
+ <IdLocation >^SourceContro22B9 .DeploymentLogD </IdLocation >
39
+ <IndexLocation >^SourceContro22B9 .DeploymentLogI </IndexLocation >
40
+ <StreamLocation >^SourceContro22B9 .DeploymentLogS </StreamLocation >
41
+ <Type >%Storage .Persistent </Type >
42
+ }
43
+
44
+ }
Original file line number Diff line number Diff line change @@ -24,14 +24,22 @@ Method OnPull() As %Status [ Abstract ]
24
24
/// <var>pullEventClass</var>: if defined, override the configured pull event class
25
25
ClassMethod ForModifications (ByRef files , pullEventClass As %String ) As %Status
26
26
{
27
+ set log = ##class (SourceControl.Git.DeploymentLog ).%New ()
28
+ set log .HeadRevision = ##class (SourceControl.Git.Utils ).GetCurrentRevision ()
29
+ set log .StartTimestamp = $zdatetime ($ztimestamp ,3 )
30
+ do log .%Save ()
27
31
set event = $classmethod (
28
32
$select (
29
33
$data (pullEventClass )#2 : pullEventClass ,
30
34
1 : ##class (SourceControl.Git.Utils ).PullEventClass ())
31
35
," %New" )
32
36
set event .LocalRoot = ##class (SourceControl.Git.Utils ).TempFolder ()
33
37
merge event .ModifiedFiles = files
34
- quit event .OnPull ()
38
+ set st = event .OnPull ()
39
+ set log .EndTimestamp = $zdatetime ($ztimestamp ,3 )
40
+ set log .Status = st
41
+ do log .%Save ()
42
+ quit st
35
43
}
36
44
37
45
/// <var>InternalName</var> may be a comma-delimited string or $ListBuild list
You can’t perform that action at this time.
0 commit comments