| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Added failOnError argument for pre-scm-buildstep
- Introduced buildsteps argument and moved list of build steps to match xml configuration of the preSCMbuildstep plugin.
- Updated existing test cases to match the new argument structure
- Added test case for pre-scm-buildstep to verify creation of failOnError tag
- Added verification on version to maintain retro-compatibility
- Updated documentation to fetch example from testcase definition
Change-Id: I25c19cd0552cf2de97b9c391492d95779c1360be
Task: 3163
Story: 2000690
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since introduction of the Jenkins Pipeline plugin
(https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Plugin), one can
configure a Pipeline job using a Groovy file lying with the source code
(see: https://jenkins.io/solutions/pipeline/).
We add support here for this kind of jobs, introducing a new component:
pipeline-scm. This component contains information about the repository to
clone and the name of the file where the job configuration can be found.
Since Workflow plugin is just an old name for the Pipeline plugin,
Workflow job type can be deprecated in favor of Pipeline job type to
avoid confusion and keep JJB in line with the terms used in Jenkins.
Change-Id: I098b9673c44b1281fa0954193d8fadf273685386
Story: 2000573
Task: 2974
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Provide syntax support for specifying default values to be substituted
for variables during deep_format when no other replacement is provided.
Allows for individual variables to have a default or be optionally blank
should nothing be placed after the custom specifier.
Change-Id: Ib97a33a2bbca123791d4ca6ef5248ed200992565
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To allow filenames referenced by the application specific yaml tags to
contain template job variables, use a lazy loading object that provides
a format method that can be called by the deep_format function.
Instead of processing the file, when a KeyError occurs on attempting to
call format on the filename after the yaml tag, create a LazyLoader
instance to wrap the data and provide a format method that can be called
at a later stage.
In order to call the correct method on the original Loader class,
LazyLoader needs to be given the custom tag class, a reference to the
loader and the node object. Using the tag class it can call the
from_yaml() method with the loader and node object to return the file
contents.
Since the result from the LazyLoader instance is triggered by calling
the format method, there is no need to escape the brackets used by
pythons format method since the output will not be passed through it.
In order to ensure this behaviour, nodes passed to the method handling
the '!include-raw-escape:' tag class, which need to use the LazyLoader
approach will convert to the '!include-raw:' tag class to the
LazyLoader initialization instead.
Due to a bug in sphinx with use of 'note' admonitions and manpage
generation, need to update to a version >= 1.2.1.
Change-Id: I187eb83ba54740c2c1b627bc99c2d9769687fbc7
Story: 2000522
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- update mailer plugin to use convert xml
- add plugin="mailer" attribute
- update doc to 4 space indent syntax
Change-Id: Ib1fd30c4e1a82a0649e452b9bf03136d1e7c5ca6
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need post-send script option to configure presendScript in the
generated configure xml.
When setting post-send as below:
postsend-script: $DEFAULT_POSTSEND_SCRIPT
We could see below informaton in the generated configure xml.
<hudson.plugins.emailext.ExtendedEmailPublisher plugin="email-ext@2.42">
<postsendScript>$DEFAULT_POSTSEND_SCRIPT</postsendScript>
</hudson.plugins.emailext.ExtendedEmailPublisher>
Change-Id: Ic215b2f3a9b5e7361a2cc1772226382da341ecd1
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
<hudson.plugins.emailext.plugins.trigger.FailureTrigger>
<email>
<compressBuildLog>true</compressBuildLog>
</email>
</hudson.plugins.emailext.plugins.trigger.FailureTrigger>
Change-Id: I3588ab1377737af94372818f43dfd6a83a0966cb
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
|
|
|
|
|
|
|
| |
Many configuration options have been extensions for at least 2 years, so
update the generated XML to actually configure these options.
Change-Id: Ic22ca4a6b8d61c977979a5eb63a2e884dc4391bd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Document the ability to define default values for template variables
within the template definition thus removing the need to always having
to set such values in job definitions.
Change-Id: If4d8bfd898066b8e6350ed22f0c97eb939ae4348
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support taking the order of the parameters to be passed through to a
triggered parameterized build from the user defined yaml via config
option. Use the existing order by default so as not to break current
usage.
The XML ordering of the parameters matters since when the same parameter
is defined through multiple sources, Jenkins uses the ordering to
determine which will be the one that that should win.
ie if FOO=BAR is set as a build parameter of the current job and a
properties file is generated during build that attempts to set FOO=BAZ;
the XML ordering determines which value, BAZ or BAR, that the triggered
job sees for the parameter FOO.
Change-Id: Ia0dafad8ed3976e7b0b11feb6b3af844bbda9d4a
|
|\ \ \
| | |/
| |/| |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is useful to allow templates that can have different settings for
slightly different jobs while still following the same naming scheme.
Additionally this allows for shorter and more descriptive names to be
used without the confusion of the variable placeholders, and for the
resulting job names from the templates to be altered without needing to
update all references.
Change-Id: Idc3517b44873210a33f988ebff449ea2ed567054
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Enabling this option will allow an event to trigger a build if the event
contains BOTH one or more wanted file paths AND one or more forbidden
file paths. In other words, with this option, the build will not get
triggered if the change contains only forbidden files, otherwise it will
get triggered.
Support for this was added in Plugin Version 2.16.0.
Change-Id: I860b076c2393909012c3ac9821559c9e8c9f7e28
|
|/
|
|
|
| |
Change-Id: I40603f041d33a27d08bf6912b7d9d885a95278fd
Signed-off-by: David Caro <dcaroest@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prefer user defined macros over inbuilt entry points, as JJB may
accidentally use a name that has already been used by an end-user to
define a custom macro.
Warn users when they have a macro defined that masks an in-built
component to avoid accidentally changing XML generated with new
releases.
Change-Id: I6cae62d7cc40be6c4a5636a74f151fcce4cdd856
|
|
|
|
|
|
|
|
|
| |
Standardize the docstrings as much as possible in the builders module to
provide good working examples to be followed. Remove unnecessary use of
'\' to reduce copy 'n' paste and convert last remaining inline example
to unit test and include inline into docstring.
Change-Id: I02fe217f3a122aaac4d770e638011144236285cb
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
There's a relatively new workflow plugin, based on the old build flow
one
Change-Id: I5541443e15335839754afee59f1b74ed29ce6676
Signed-off-by: David Caro <dcaroest@redhat.com>
|
|/
|
|
|
|
|
|
| |
In complex configurations it may be useful to have a template
print out its name so that a given job can be easily traced to
its definition.
Change-Id: I1cfed9c27a58b45ba48aeed04839bfc8f54a831e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement custom tags for including files by subclassing YAMLObject to
allow PyYAML to easily convert from the Yaml nodes.
Change to support both lists and strings under the same tag name and
deprecate the old tag naming. Rename tests using the deprecated tags to
ensure they are not used for examples. Remove old tests that simply
duplicate others.
Change-Id: I1a8d3376ea6e4918a2adb05fb856b939a3124d74
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I8661910761ed2a3faab0dcf021fd23ceb71e150b
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Remove the test options suppressing ignoring differences in whitespace
outputted in the XML to allow capturing of issues where the code
incorrectly adds or removes significant whitespace.
Add a helper function to deal with the edge case of parsing XML directly
that contains non significant whitespace to avoid accidentally adding
excess whitespace when minidom outputs the resulting document.
Change-Id: I9936042cd82c204ba2b3c19f575703e33564f7fd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Support new options, disable-publisher option that is intended to
disable the publisher without removing the settings for testing,
and the both-html-text content-type option for the email-ext
plugin.
Change-Id: I6dab8101f8859a98be0c4a5f8068661c7af66a6b
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Following options are added -
* Other jobs on which this job depends
* Notification Level
* Unsuccessful Message File
* Silent Start Mode
Gerrit docstring cleanup for better indentation.
Change-Id: I2d0988973dcdd7ff32e7cdcd2c2676da3235e7fc
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
In code the `include_path` and defaults like `.` added to a set as opposed a list.
Resulting in that the order is machine/hashcode specific and
that user cannot make i.e. `.` to have higher precedence than
the fallbacks.
Without doing this you have to use absolute or unique paths which
might not always be possible in your .ini file.
Change-Id: I9721b168a67e799dfc19d7df951b99c0749b52e0
|
|
|
|
|
|
|
|
|
|
| |
waynr fixed a bug but explained in concat_defaults002
This bug happens when some values are specified in an other defaults
namespace then global.
This causes JJB to fail that its unable to find the required keys
becasue these were not merged correctly
Change-Id: Id0df24ba7cf8281389c2ed7af7ee716047d0e4a5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Anchors and aliases were expanded internally within JJB's yaml loading
calls so they were limited to individual documents. Now, included files
will have access to aliases of anchors already defined at previously
processed files.
Example:
- default:
name: default-timeout-wrapper
timeout: &timeout
fail: true
elastic-percentage: 150
elastic-default-timeout: 90
type: elastic
- wrapper: !include include002_1.yaml.inc
Previously was not possible to use '*timeout' alias inside
include002_1.yaml.inc file
Closes-Story: 2000173
Change-Id: Ic031ddbb0310bd11748183fbde9502735c3b7169
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'raw' allow users to have a fallback in case
a plugin is not yet supported or the plugin is not generating the
expected result.
Only intended as a last fallback, but useful when waiting for
review to complete.
Change-Id: If0d22d7d43d35649e78aa7481e1c0f1ed21a6025
|
| |
| |
| |
| |
| |
| |
| |
| | |
it was missing the options to set the verified and code review values on
unstable, start and not built statuses.
Change-Id: Ia462d48efc645218281040ff38ab0f7c00e1859d
Signed-off-by: David Caro <dcaroest@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a new configuration option under the section "job_builder" named
"allow_empty_variables" that if set to true, will replace non existing variables
in strings with the empty string instead of raising an error.
It's very useful if you have a shell script, that has optional values, for
example:
EXTRA_PACKAGES=({extra-packages})
for package in "${EXTRA_PACKAGES[@]}"; do
install "$package"
done
Or modifying the script behavior with flags, with empty as default value:
WITH_AUTOGEN={with-autogen}
if [[ $WITH_AUTOGEN ]]; then
./autogen.sh
fi
Then if you have two different jobs that use that script in their builder, you
just have to set the extra parameter or ignore it to change the behavior:
- builder:
name: mybuilder
builders:
- shell: !include shell-scripts/myscript.sh
- job-template:
name: 'mytpl-{name}'
...
builders:
- mybuilder
- project:
name: myproj1
with-autogen: true
jobs:
- 'mytpl-{name}'
- project:
name: myproj2
extra-packages: |
extrapkg1
extrapkg2
Change-Id: Iad9f0e522725e6fd6681cd62d3e36f69baf09585
Signed-off-by: David Caro <dcaroest@redhat.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Allow requiring a workspace.
* Allow running a DSL script from file.
* Adding job parameters documentation.
Change-Id: Ida71e40df3dd440d956b91005d932915bdb3d4f7
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The test includes both a basic example and a user defined
axis example.
Change-Id: I88f7a17928c4f6b56814c3cc5c843b949358ac2d
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
This bug occurs if one attempts to set a list object on a job template for a
parameter that does not occur in the job name. If the parameter is not in the
template name then there is no reason to count it among the dimensions used to
fanout that template into multiple instances and in fact this would actually
lead to confusing duplicate job error messages.
Change-Id: I80f026d3bbfbac96c6fc7c01c1c916cf85e1bf10
|
| |
| |
| |
| |
| |
| |
| |
| | |
Adds ability to keep base64 encoded gerrit trigger
variables (such as commit message) in human readable
format.
Change-Id: Ie96d633ab9dc96dacf859409fd649bd981f9eb7c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch enables parameters to be expanded inside of other parameters. For
instance:
- job-template:
name: '{value-stream}_{pipeline_type}_foo'
builders:
- shell: 'echo "I am foo job!"'
publishers:
- trigger-parameterized-builds:
- project: '{downstream}'
current-parameters: False
condition: ALWAYS
git-revision: True
- job-template:
name: '{value-stream}_{pipeline_type}_bar'
builders:
- shell: 'echo "I am bar job!"'
publishers:
- trigger-parameterized-builds:
- project: '{downstream}'
current-parameters: False
condition: ALWAYS
git-revision: True
- job-template:
name: '{value-stream}_{pipeline_type}_baz'
builders:
- shell: 'echo "I am baz job!"'
publishers:
- trigger-parameterized-builds:
- project: '{downstream}'
current-parameters: False
condition: ALWAYS
git-revision: True
- job-group:
name: 'pipeline2'
pipeline_type: 'p2'
jobs:
- '{value-stream}_{pipeline_type}_foo':
downstream: '{value-stream}_{pipeline_type}_bar'
- '{value-stream}_{pipeline_type}_bar':
downstream: '{value-stream}_{pipeline_type}_baz'
- '{value-stream}_{pipeline_type}_baz':
- job-group:
name: 'pipeline1'
pipeline_type: 'p1'
jobs:
- '{value-stream}_{pipeline_type}_baz':
downstream: '{value-stream}_{pipeline_type}_bar'
- '{value-stream}_{pipeline_type}_bar':
downstream: '{value-stream}_{pipeline_type}_foo'
- '{value-stream}_{pipeline_type}_foo':
- project:
name: derp
jobs:
- 'pipeline1':
value-stream:
- experimental
- staging
- 'pipeline2':
value-stream:
- experimental
- staging
- production
Prior to this commit, the setup above was not possible because the `downstream`
defined as parameters to be passed to job templates in the job groups would not
have the `value-stream` and `pipeline-type` parameters interpolated. The
trigger-parameterized-jobs `project` value for each of the 15 jobs created with
this setup would all look something like `{value-stream}_{pipeline_type}_foo`
which does not actually point to any particular job.
The only way I was previously able to specify a downstream job with parameters
was to put the `{value-stream}_{pipeline_type}_foo` string directly in the
job-template which meant that job templates were statically bound to each
other--I had no reasonable way to re-order or easily select subsets of the jobs
at the job-group or project level as can be seen here in the difference between
`pipeline1` and `pipeline2`.
Change-Id: I26dfb112cd4842c40c3d561f8de89f7654a07b8f
|
|\| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
JJB currently allows for named defaults to be specified at both the
project and template level. Add a test case that exercises this and
demonstrates that current interpolation ignores variables without
definitions if they are not subsequently used when expanding the
template.
Change-Id: Iffdda9f79c12fb71077bf621f8b08381dbcc9ac1
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I7bacce4f495989f8b37d6fc6b1bd773326e83b57
|