summaryrefslogtreecommitdiffstats
path: root/jenkins_jobs/modules/general.py
Commit message (Collapse)AuthorAgeFilesLines
* Update Jenkins wiki -> plugins URLs buildersThanh Ha2020-01-221-2/+3
| | | | | | | | | | The Jenkins Wiki page is deprecated and Jenkins community is expected to migrate their documentation to plugins.jenkins.io URL. This patch updates all builders that have a relevant plugins.jenkins.io URL documentation link. Change-Id: Ib07ebb4dceb23325e8d401dd9c0a8dfb9f49cd80 Signed-off-by: Thanh Ha <zxiiro@gmail.com>
* Auto-generated output from python-blackThanh Ha2019-09-091-57/+54
| | | | | | | | | Please review the following patch containing the code changes in the repo. This patch is a transition patch and is the auto-generated output of the python-black tool. Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032 Signed-off-by: Thanh Ha <zxiiro@gmail.com>
* bug/2002053 allow None for auth-tokenDaniel Richardson2018-05-161-2/+3
| | | | | | | auth-tokean as None type should exclude from the build job valuable for reuseing jobs that sometime need auth and othertimes don't Change-Id: I691e7dd4ff1af53efd9fac3363bce9d41038cf25
* Basic folder supportDarragh Bailey2017-10-231-1/+6
| | | | | | | | | | | | | | | | | Allows specifying a folder attribute for each job generated, which in turn is used when creating or uploading to place the job under the requested folder. The job name is expanded after defaults are applied, to support the attribute being defined within a set of defaults applied to a number of jobs. This in turn allows for multiple jobs with the same basename to exist, provided they are targeted at different folders. Does not support creating the folders if they do not exist. Change-Id: I8c2157c4c81087cc972a048d1b88d5f08ac65361
* Add Pipeline job type and deprecate WorkflowYann Voté2017-01-241-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Merge "Fix disabled always returning true"Jenkins2016-09-011-4/+7
|\
| * Fix disabled always returning trueThanh Ha2016-08-191-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | If disabled is configured to anything the existing code returns true. Typically what was done to avoid this was to ensure disabled was returned in the job as {obj:disabled} to keep the original type. However if the user uses a JJB 'defaults', defaults always return a string so {obj:disabled} does not receive a boolean it's expecting causing disabled's value to always be a string which in code returns as true always. Change-Id: Ifd391945fbc7478a10d794e50a61559688c1a23e Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
* | Cleanup various deprecation warnings.Wayne Warren2016-08-201-3/+3
| | | | | | | | Change-Id: Iec16a5965d62bebb50d3e7307ab93c59304a9ab6
* | Disentangle YamlParser and ModuleRegistry classesWayne Warren2016-08-181-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | Create the ModuleRegistry anywhere other than inside the YamlParser class. This will make it slightly easier to factor a XmlGenerator out of YamlParser, but I also want to work toward eliminating the circular references between YamlParser and ModuleRegistry which have been making it difficult to understand overall program flow. This commit also replaces all YamlParser instances being passed to Jenkins job config generating functions with a ModuleRegistry. Mostly it seems like the parser was only needed to call the ModuleRegistry's 'dispatch' method which to be honest I don't fully understand. This is where the circular references mentioned in previously come in...it seems like the "dispatch" function needs access to the (mostly) raw data contained by the parser, so it took that as a parameter. The need for the YamlParser's job data can be satisfied by assigning it to a property on the ModuleRegistry object before Yaml expansion or XML generation begins; by doing this, we allow the ModuleRegistry to avoid referencing the parser. Change-Id: I4b571299b81e708540392ad963163fe092acf1d9
* Added a doc entry and a test for jdk general parameterThomas Desvenain2016-07-221-0/+3
| | | | Change-Id: I8e42e0a10f1fba2fd0e2931481f5e720be278b9d
* Adding the build-discarder propertyDavid Caro2016-03-021-0/+10
| | | | | | | | | | This deprecates the logrotate generic element of the jobs, as it's not supported anymore on jenkins>1.637, see: https://github.com/jenkinsci/jenkins/commit/1cbbb23923d002dc6e676bfcaecbf8cbddb2e974 Change-Id: Ib086aef43e4833855b5827ad0ed3310e8db7d7b9 Signed-off-by: David Caro <dcaroest@redhat.com>
* Reorder imports to match hacking guidelinesDarragh Bailey2015-12-231-0/+1
| | | | | | | Ensure that the imports follow the standard OpenStack hacking guidelines. Change-Id: Iaa4326aef118ddfd807dd006934f1d9ca80a1cfa
* Merge "Allow raw XML at project top-level"Jenkins2015-12-141-0/+7
|\
| * Allow raw XML at project top-levelJonathan Perret2015-10-091-0/+7
| | | | | | | | | | | | This allows a `raw` section at the top-level of a job definition. Change-Id: Id76bbfbde8df49b221fcd1198354ba8b5ce9fb02
* | Added support for the workflow job typeDavid Caro2015-11-241-2/+2
|/ | | | | | | | 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>
* Allow whitespace to be significantDarragh Bailey2015-08-111-0/+2
| | | | | | | | | | | | 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
* Merge "Support for externaljob project-type for monitoring external jobs"Jenkins2015-08-071-2/+2
|\
| * Support for externaljob project-type for monitoring external jobsSomay Jain2015-08-011-2/+2
| | | | | | | | Change-Id: I8904725f75d27180d44c55768605db7d67e79586
* | general: add support for childCustomWorkspaceFathi Boudra2015-07-131-0/+7
|/ | | | | | | | | | On freestyle project, we can set custom workspace. On matrix project, we can set custom workspace and child custom workspace. It allows to specify the directory for sub-builds. Change-Id: Icef3831174ff805e86f1ece84fef9a438f465691 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
* Add support for 'raw' to inject direct xml to job configs.Max Rydahl Andersen2015-05-021-0/+7
| | | | | | | | | | | '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
* Document node parameter usage with matrix projectsClayton O'Neill2014-11-241-2/+3
| | | | | | | | | | The Matrix Tie Parent plugin has been deprecated for a while and the documentation for it in JJB mentions that it's deprecated, but the documentation doesn't call out how to use the new way of doing it. This patch updates the documentation to explicitly call out that the node parameter only controls the matrix job's parent job. Change-Id: Ie784f6d90667a0bc66ae0efd3eda1974ddbac4f2
* doc change: remove duplicate general job parametersKhai Do2014-11-111-30/+77
| | | | | | | | | This change adds a test to validate the general job parameters and uses that test as documentation for the general module. It also replaces the doc of the general params in the top level definitions.rst with references to the general module. Change-Id: I3df04d69186ca49d7297f8141855a4c72c73be1e
* add retry-count in general.pyVitaliy Lotorev2014-03-281-0/+4
| | | | | | | implement retry-coutn in general.py; update doc and add test fixtures Change-Id: Ifeb4fb645ad0e4bc12d41ef4481aca1888a4041a
* Add display-name job property.Benjamin Staffin2013-11-051-1/+3
| | | | | | | There is apparently no way to clear this property using the REST api once it is set, and the included documentation change warns of that. Change-Id: I49c5a91664cd37196f3239854bb0adbcf5b3c9f9
* Merge "Fix indentation in example of Logrotate section"Jenkins2013-11-051-4/+4
|\
| * Fix indentation in example of Logrotate sectionMathieu Gagné2013-10-311-4/+4
| | | | | | | | Change-Id: I893a4c8638fd35a90e1e3361a473212db115f22e
* | Added default value of -1 for all logrotate attributesDzmitry Horbach2013-10-281-4/+6
|/ | | | | | | You don't need to specify all logrotate explicitely as -1 if you don't want to manage them. Jenkins will automatically populate them as -1 if you don't enter any value. Change-Id: Id9ee223d94e2c43cd0a1c1f5547a25858873ed92
* Not sending description or disabled by defaultDavid Caro2013-08-021-6/+10
| | | | | | | | | | | | To be able to manually disable/enable a job and edit it's description I've disabled sending the description or the disabled options if they are not specifically specified. So now when no description or not disabled is specified in the yaml, they will not be changed in the job. Change-Id: Iad3e61eabd0acd057ad45df7784fa7788246172c Signed-off-by: David Caro <dcaroest@redhat.com>
* add an auth-token YAML parameter for the General Job Configuraion moduleJavier Martinez Canillas2013-04-041-0/+2
| | | | | | | | | | | | | | | | | Using the Jenkins WEB UI an Authentication Token can be specified for jobs to allow builds to be triggered remotely by using the URL: JENKINS_URL/job/JOBNAME/build?token=TOKEN Add an auth-token job parameter to generate the <authToken> XML element. Change-Id: Ic916e4074c9b2de9c616ef39a88c1d8e1e91fcff Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Reviewed-on: https://review.openstack.org/25819 Reviewed-by: Arnaud Fabre <fabre.arnaud@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
* Jobs not tied to a node can roamWill Soula2013-03-211-0/+2
| | | | | | | | | | | | | | | | | | Previously if you did not specify a node for a job to build on then the job would be marked as tied to master. The checkbox for 'Restrict where this project can be run' would be checked but nothing entered into the textbox so it ended up tied to master. This change adds an else to the check for 'node' and if 'node' is not found then canRoam is set to true. This is a two line change to modules/general.py Change-Id: Id7e40ba5ae2eaa92fd7678da7b3acefc1ba4ee32 Reviewed-on: https://review.openstack.org/24669 Reviewed-by: Khai Do <zaro0508@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
* job now supports a custom workspaceAntoine Musso2013-03-211-0/+3
| | | | | | | | | | | | | | | In Jenkins, the job advanced options has a tick box to enable a workspace space different from the default provided internally by Jenkins. The XML element is <customWorkspace />. Change-Id: Ia432d98523a7cb617c1236acb52821a82b67c8e7 Reviewed-on: https://review.openstack.org/24427 Reviewed-by: Arnaud Fabre <fabre.arnaud@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Reviewed-by: Khai Do <zaro0508@gmail.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
* Adding ability to specify the JDK to use. This change moves the top level ↵william.soula2012-12-191-0/+97
config from builder.py into a separate file called general.py. This change also moves the assigned node work as well as the log rotator work into the general.py file. This change also adds the ability to specify the JDK for the build to use. Change-Id: I0e2b43d889593e01d6ad0761960c93472990af1e Reviewed-on: https://review.openstack.org/16983 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins