File tree Expand file tree Collapse file tree
src/main/groovy/com/eficode/devstack/container/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ class JsmContainer implements Container{
1010
1111 String containerName = " JSM"
1212 String containerMainPort = " 8080"
13+ ArrayList < String > customEnvVar = [] // Ex: ["key=value", "PATH=/user/local/sbin"]
1314 String containerImage = " atlassian/jira-servicemanagement"
1415 String containerImageTag = " latest"
1516 long jvmMaxRam = 6000
@@ -41,14 +42,16 @@ class JsmContainer implements Container{
4142 ContainerCreateRequest containerCreateRequest = new ContainerCreateRequest (). tap { c ->
4243
4344 c. image = imageName + " :" + imageTag
44- c. env = [" JVM_MAXIMUM_MEMORY=" + jsmMaxRamMB. toString() + " m" , " JVM_MINIMUM_MEMORY=" + ((jsmMaxRamMB / 2 ) as String ) + " m" ]
45+ c. env = [" JVM_MAXIMUM_MEMORY=" + jsmMaxRamMB. toString() + " m" , " JVM_MINIMUM_MEMORY=" + ((jsmMaxRamMB / 2 ) as String ) + " m" ] + customEnvVar
4546 c. exposedPorts = [(jsmPort + " /tcp" ): [:]]
4647 c. hostConfig = new HostConfig (). tap { h -> h. portBindings = [(jsmPort+ " /tcp" ): [new PortBinding (" 0.0.0.0" , (jsmPort))]] }
4748
4849 }
4950
5051
5152
53+
54+
5255 // EngineResponseContent response = dockerClient.run(containerCreateRequest, jsmContainerName)
5356 EngineResponseContent response = dockerClient. createContainer(containerCreateRequest, jsmContainerName)
5457 assert response. content. warnings. isEmpty(): " Error when creating $jsmContainerName container:" + response. content. warnings. join(" ," )
You can’t perform that action at this time.
0 commit comments