| 1 |
# Copyright 2012 Hewlett-Packard Development Company, L.P. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 |
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 |
# License for the specific language governing permissions and limitations |
| 13 |
# under the License. |
| 14 |
|
| 15 |
|
| 16 |
""" |
| 17 |
The Freestyle Project module handles creating freestyle Jenkins |
| 18 |
projects (i.e., those that do not use Maven). You may specify |
| 19 |
``freestyle`` in the ``project-type`` attribute to the :ref:`Job` |
| 20 |
definition if you wish, though it is the default, so you may omit |
| 21 |
``project-type`` altogether if you are creating a freestyle project. |
| 22 |
|
| 23 |
Example:: |
| 24 |
|
| 25 |
job: |
| 26 |
name: test_job |
| 27 |
project-type: freestyle |
| 28 |
""" |
| 29 |
|
| 30 |
import xml.etree.ElementTree as XML |
| 31 |
|
| 32 |
import jenkins_jobs.modules.base |
| 33 |
|
| 34 |
|
| 35 |
class Freestyle(jenkins_jobs.modules.base.Base): |
| 36 |
sequence = 0 |
| 37 |
|
| 38 |
def root_xml(self, data): |
| 39 |
xml_parent = XML.Element("project") |
| 40 |
return xml_parent |