def copyartifact_build_selector_param(registry, xml_parent, data): """yaml: copyartifact-build-selector Control via a build parameter, which build the copyartifact plugin should copy when it is configured to use 'build-param'. Requires the Jenkins :jenkins-wiki:`Copy Artifact plugin <Copy+Artifact+Plugin>`. :arg str name: name of the build parameter to store the selection in :arg str description: a description of the parameter (optional) :arg str which-build: which to provide as the default value in the UI. See ``which-build`` param of :py:mod:`~builders.copyartifact` from the builders module for the available values as well as options available that control additional behaviour for the selected value. Example: .. literalinclude:: /../../tests/parameters/fixtures/copyartifact-build-selector001.yaml :language: yaml """ t = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.' 'BuildSelectorParameter') try: name = data['name'] except KeyError: raise MissingAttributeError('name') XML.SubElement(t, 'name').text = name XML.SubElement(t, 'description').text = data.get('description', '') copyartifact_build_selector(t, data, 'defaultSelector')
def copyartifact_build_selector_param(registry, xml_parent, data): """yaml: copyartifact-build-selector Control via a build parameter, which build the copyartifact plugin should copy when it is configured to use 'build-param'. Requires the Jenkins :jenkins-wiki:`Copy Artifact plugin <Copy+Artifact+Plugin>`. :arg str name: name of the build parameter to store the selection in :arg str description: a description of the parameter (optional) :arg str which-build: which to provide as the default value in the UI. See ``which-build`` param of :py:mod:`~builders.copyartifact` from the builders module for the available values as well as options available that control additional behaviour for the selected value. Example: .. literalinclude:: /../../tests/parameters/fixtures/copyartifact-build-selector001.yaml :language: yaml """ t = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.' 'BuildSelectorParameter') mapping = [ ('name', 'name', None), ('description', 'description', ''), ] helpers.convert_mapping_to_xml(t, data, mapping, fail_required=True) helpers.copyartifact_build_selector(t, data, 'defaultSelector')
def copyartifact_build_selector_param(registry, xml_parent, data): """yaml: copyartifact-build-selector Control via a build parameter, which build the copyartifact plugin should copy when it is configured to use 'build-param'. Requires the Jenkins :jenkins-wiki:`Copy Artifact plugin <Copy+Artifact+Plugin>`. :arg str name: name of the build parameter to store the selection in :arg str description: a description of the parameter (optional) :arg str which-build: which to provide as the default value in the UI. See ``which-build`` param of :py:mod:`~builders.copyartifact` from the builders module for the available values as well as options available that control additional behaviour for the selected value. Example: .. literalinclude:: /../../tests/parameters/fixtures/copyartifact-build-selector001.yaml :language: yaml """ t = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.' 'BuildSelectorParameter') try: name = data['name'] except KeyError: raise MissingAttributeError('name') XML.SubElement(t, 'name').text = name XML.SubElement(t, 'description').text = data.get('description', '') copyartifact_build_selector(t, data, 'defaultSelector')
def copyartifact_build_selector_param(registry, xml_parent, data): """yaml: copyartifact-build-selector Control via a build parameter, which build the copyartifact plugin should copy when it is configured to use 'build-param'. Requires the Jenkins :jenkins-wiki:`Copy Artifact plugin <Copy+Artifact+Plugin>`. :arg str name: name of the build parameter to store the selection in :arg str description: a description of the parameter (optional) :arg str which-build: which to provide as the default value in the UI. See ``which-build`` param of :py:mod:`~builders.copyartifact` from the builders module for the available values as well as options available that control additional behaviour for the selected value. Example: .. literalinclude:: /../../tests/parameters/fixtures/copyartifact-build-selector001.yaml :language: yaml """ t = XML.SubElement(xml_parent, 'hudson.plugins.copyartifact.' 'BuildSelectorParameter') mapping = [ ('name', 'name', None), ('description', 'description', ''), ] helpers.convert_mapping_to_xml(t, data, mapping, fail_required=True) helpers.copyartifact_build_selector(t, data, 'defaultSelector')