diff --git a/jenkins_jobs/modules/wrappers.py b/jenkins_jobs/modules/wrappers.py
index 27f01adb6..79fdbeed0 100644
--- a/jenkins_jobs/modules/wrappers.py
+++ b/jenkins_jobs/modules/wrappers.py
@@ -68,6 +68,10 @@ def docker_custom_build_env(registry, xml_parent, data):
permission set
:arg str command: Container start command (default '/bin/cat')
:arg str net: Network bridge (default 'bridge')
+ :arg str memory-limit: Configure the limit memory
+ constraint (default '')
+ :arg str cpu-shares: Configure the CPU shares
+ constraint (default '')
.. _image_types:
@@ -152,6 +156,8 @@ def docker_custom_build_env(registry, xml_parent, data):
('group', 'group', ''),
('command', 'command', '/bin/cat'),
('net', 'net', 'bridge'),
+ ('memory-limit', 'memory', ''),
+ ('cpu-shares', 'cpu', ''),
]
helpers.convert_mapping_to_xml(
entry_xml, data, mapping, fail_required=True)
diff --git a/tests/wrappers/fixtures/docker-custom-build-env001.xml b/tests/wrappers/fixtures/docker-custom-build-env001.xml
index b78b7466a..be8f18ef5 100644
--- a/tests/wrappers/fixtures/docker-custom-build-env001.xml
+++ b/tests/wrappers/fixtures/docker-custom-build-env001.xml
@@ -15,6 +15,8 @@
jenkins
/bin/cat
bridge
+ memory=L<inf, memory-swap=inf
+ 2
diff --git a/tests/wrappers/fixtures/docker-custom-build-env001.yaml b/tests/wrappers/fixtures/docker-custom-build-env001.yaml
index 2fc630f01..52446d8ad 100644
--- a/tests/wrappers/fixtures/docker-custom-build-env001.yaml
+++ b/tests/wrappers/fixtures/docker-custom-build-env001.yaml
@@ -8,3 +8,5 @@ wrappers:
group: jenkins
command: /bin/cat
net: bridge
+ memory-limit: memory=L
/bin/cat
bridge
+
+