Merge "Remove includes and parameter functions" into feature/zuulv3
diff --git a/doc/source/launchers.rst b/doc/source/launchers.rst
index 78d5839..8a8c932 100644
--- a/doc/source/launchers.rst
+++ b/doc/source/launchers.rst
@@ -273,9 +273,7 @@
build:FUNCTION_NAME:NODE_NAME
where **NODE_NAME** is the name or class of node on which the job
-should be run. This can be specified by setting the ZUUL_NODE
-parameter in a parameter-function (see :ref:`includes` section in
-:ref:`zuulconf`).
+should be run.
Zuul sends the ZUUL_* parameters described in `Zuul Parameters`_
encoded in JSON format as the argument included with the
diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst
index 102beac..ad6a061 100644
--- a/doc/source/zuul.rst
+++ b/doc/source/zuul.rst
@@ -261,26 +261,6 @@
Zuul should perform. There are three sections: pipelines, jobs, and
projects.
-.. _includes:
-
-Includes
-""""""""
-
-Custom functions to be used in Zuul's configuration may be provided
-using the ``includes`` directive. It accepts a list of files to
-include, and currently supports one type of inclusion, a python file::
-
- includes:
- - python-file: local_functions.py
-
-**python-file**
- The path to a python file (either an absolute path or relative to the
- directory name of :ref:`layout_config <layout_config>`). The
- file will be loaded and objects that it defines will be placed in a
- special environment which can be referenced in the Zuul configuration.
- Currently only the parameter-function attribute of a Job uses this
- feature.
-
Pipelines
"""""""""
@@ -800,33 +780,6 @@
**tags (optional)**
A list of arbitrary strings which will be associated with the job.
- Can be used by the parameter-function to alter behavior based on
- their presence on a job. If the job name is a regular expression,
- tags will accumulate on jobs that match.
-
-**parameter-function (optional)**
- Specifies a function that should be applied to the parameters before
- the job is launched. The function should be defined in a python file
- included with the :ref:`includes` directive. The function
- should have the following signature:
-
- .. function:: parameters(item, job, parameters)
-
- Manipulate the parameters passed to a job before a build is
- launched. The ``parameters`` dictionary will already contain the
- standard Zuul job parameters, and is expected to be modified
- in-place.
-
- :param item: the current queue item
- :type item: zuul.model.QueueItem
- :param job: the job about to be run
- :type job: zuul.model.Job
- :param parameters: parameters to be passed to the job
- :type parameters: dict
-
- If the parameter **ZUUL_NODE** is set by this function, then it will
- be used to specify on what node (or class of node) the job should be
- run.
**swift**
If :ref:`swift` is configured then each job can define a destination
diff --git a/zuul/launcher/client.py b/zuul/launcher/client.py
index 96a524d..a9b8b11 100644
--- a/zuul/launcher/client.py
+++ b/zuul/launcher/client.py
@@ -13,7 +13,6 @@
# under the License.
import gear
-import inspect
import json
import logging
import os
@@ -284,16 +283,6 @@
for key, value in swift_instructions.items():
params['_'.join(['SWIFT', name, key])] = value
- if callable(job.parameter_function):
- pargs = inspect.getargspec(job.parameter_function)
- if len(pargs.args) == 2:
- job.parameter_function(item, params)
- else:
- job.parameter_function(item, job, params)
- self.log.debug("Custom parameter function used for job %s, "
- "change: %s, params: %s" % (job, item.change,
- params))
-
def launch(self, job, item, pipeline, dependent_items=[]):
uuid = str(uuid4().hex)
self.log.info(
diff --git a/zuul/layoutvalidator.py b/zuul/layoutvalidator.py
index 1f008c3..57c1fad 100644
--- a/zuul/layoutvalidator.py
+++ b/zuul/layoutvalidator.py
@@ -50,9 +50,6 @@
class LayoutSchema(object):
- include = {'python-file': str}
- includes = [include]
-
manager = v.Any('IndependentPipelineManager',
'DependentPipelineManager')
@@ -129,7 +126,6 @@
'voting': bool,
'mutex': str,
'tags': toList(str),
- 'parameter-function': str,
'branch': toList(str),
'files': toList(str),
'swift': toList(swift),
diff --git a/zuul/model.py b/zuul/model.py
index 9cd9d09..a691f96 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -424,7 +424,6 @@
branch_matcher=None,
file_matcher=None,
irrelevant_file_matcher=None, # skip-if
- parameter_function=None, # TODOv3(jeblair): remove
tags=set(),
mutex=None,
)