@@ -27,6 +27,8 @@ class JsmDevDeployment implements Deployment {
27
27
Volume allureReportVolume
28
28
DirectorySyncer reportSyncer
29
29
30
+ private Builder builder
31
+
30
32
DockerClientDS dockerClient
31
33
32
34
// Used when naming various Docker components
@@ -127,8 +129,7 @@ class JsmDevDeployment implements Deployment {
127
129
allureContainer. created ?: allureContainer. createContainer()
128
130
allureContainer. startContainer()
129
131
130
-
131
- jsmDeployment. setupDeployment(true , true )
132
+ jsmDeployment. setupDeployment(builder. useSnapshotIfAvailable, builder. snapshotAfterCreation)
132
133
// Change owner of the mounted volume
133
134
jsmContainer. runBashCommandInContainer(" chown -R jira:jira /var/atlassian/application-data/jira/allure-results" , 10 , " root" )
134
135
@@ -145,6 +146,8 @@ class JsmDevDeployment implements Deployment {
145
146
private String jsmVersion = " latest"
146
147
private String jsmJvmDebugPort = " 5005"
147
148
private Boolean enableJsmDooD = false
149
+ private Boolean useSnapshotIfAvailable = false
150
+ private Boolean snapshotAfterCreation = false
148
151
149
152
private Map<String , String > appsToInstall = [:]
150
153
@@ -194,6 +197,16 @@ class JsmDevDeployment implements Deployment {
194
197
return this
195
198
}
196
199
200
+ Builder useSnapshotIfAvailable ( ) {
201
+ this . useSnapshotIfAvailable = true
202
+ return this
203
+ }
204
+
205
+ Builder snapshotAfterCreation ( ) {
206
+ this . snapshotAfterCreation = true
207
+ return this
208
+ }
209
+
197
210
198
211
JsmDevDeployment build () {
199
212
@@ -207,7 +220,7 @@ class JsmDevDeployment implements Deployment {
207
220
devDeployment. jsmDeployment. jsmContainer. prepareBindMount(" /var/run/docker.sock" , " /var/run/docker.sock" , false )
208
221
}
209
222
devDeployment. jsmDeployment. appsToInstall = this . appsToInstall
210
-
223
+ devDeployment . builder = this
211
224
212
225
return devDeployment
213
226
0 commit comments