docker-custom-build-env: Add support for new options
Change-Id: I9482d2e3c98cf8058d5689cd688b8cc489bbb016 Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu> Signed-off-by: Anil Belur <askb23@gmail.com>
This commit is contained in:
parent
4d5397c496
commit
55310657f0
@ -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)
|
||||
|
@ -15,6 +15,8 @@
|
||||
<group>jenkins</group>
|
||||
<command>/bin/cat</command>
|
||||
<net>bridge</net>
|
||||
<memory>memory=L<inf, memory-swap=inf</memory>
|
||||
<cpu>2</cpu>
|
||||
</com.cloudbees.jenkins.plugins.okidocki.DockerBuildWrapper>
|
||||
</buildWrappers>
|
||||
</project>
|
||||
|
@ -8,3 +8,5 @@ wrappers:
|
||||
group: jenkins
|
||||
command: /bin/cat
|
||||
net: bridge
|
||||
memory-limit: memory=L<inf, memory-swap=inf
|
||||
cpu-shares: 2
|
||||
|
@ -28,6 +28,8 @@
|
||||
<group/>
|
||||
<command>/bin/cat</command>
|
||||
<net>bridge</net>
|
||||
<memory/>
|
||||
<cpu/>
|
||||
</com.cloudbees.jenkins.plugins.okidocki.DockerBuildWrapper>
|
||||
</buildWrappers>
|
||||
</project>
|
||||
|
Loading…
Reference in New Issue
Block a user